Struct openssh_mux_client::NonZeroByteSlice

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

Implementations§

source§

impl NonZeroByteSlice

source

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

source

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

§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<(), Error>

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

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

source§

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

Converts to this type from the input type.
source§

impl From<&NonZeroByteSlice> for NonZeroByteVec

source§

fn from(slice: &NonZeroByteSlice) -> NonZeroByteVec

Converts to this type from the input type.
source§

impl Hash for NonZeroByteSlice

source§

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

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 as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

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

impl ToOwned for NonZeroByteSlice

source§

type Owned = NonZeroByteVec

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> <NonZeroByteSlice as ToOwned>::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

source§

type Error = NullByteError

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

fn try_from( s: &'a str, ) -> Result<&'a NonZeroByteSlice, <&'a NonZeroByteSlice as TryFrom<&'a str>>::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