Struct openssh_mux_client::NonZeroByteSlice

source ·
pub struct NonZeroByteSlice(/* private fields */);

Implementations§

source§

impl NonZeroByteSlice

source

pub fn new(bytes: &[u8]) -> Option<&Self>

source

pub const unsafe fn new_unchecked(bytes: &[u8]) -> &Self

§Safety
  • bytes - Must not contain 0.
source

pub const fn into_inner(&self) -> &[u8]

Trait Implementations§

source§

impl Borrow<NonZeroByteSlice> for NonZeroByteVec

source§

fn borrow(&self) -> &NonZeroByteSlice

Immutably borrows from an owned value. Read more
source§

impl Debug for NonZeroByteSlice

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a> From<&'a CStr> for &'a NonZeroByteSlice

source§

fn from(s: &'a CStr) -> Self

Converts to this type from the input type.
source§

impl From<&NonZeroByteSlice> for NonZeroByteVec

source§

fn from(slice: &NonZeroByteSlice) -> Self

Converts to this type from the input type.
source§

impl Hash for NonZeroByteSlice

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
source§

impl PartialEq for NonZeroByteSlice

source§

fn eq(&self, other: &NonZeroByteSlice) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for NonZeroByteSlice

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl ToOwned for NonZeroByteSlice

§

type Owned = NonZeroByteVec

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> Self::Owned

Creates owned data from borrowed data, usually by cloning. Read more
1.63.0 · source§

fn clone_into(&self, target: &mut Self::Owned)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<'a> TryFrom<&'a str> for &'a NonZeroByteSlice

§

type Error = NullByteError

The type returned in the event of a conversion error.
source§

fn try_from(s: &'a str) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl Eq for NonZeroByteSlice

source§

impl StructuralPartialEq for NonZeroByteSlice

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more