Struct openssh_mux_client::NonZeroByteSlice
source · pub struct NonZeroByteSlice(/* private fields */);
Implementations§
source§impl NonZeroByteSlice
impl NonZeroByteSlice
pub const fn new(bytes: &[u8]) -> Option<&NonZeroByteSlice>
sourcepub const unsafe fn new_unchecked(bytes: &[u8]) -> &NonZeroByteSlice
pub const unsafe fn new_unchecked(bytes: &[u8]) -> &NonZeroByteSlice
Safety
bytes
- Must not contain0
.
pub const fn into_inner(&self) -> &[u8] ⓘ
Trait Implementations§
source§impl Borrow<NonZeroByteSlice> for NonZeroByteVec
impl Borrow<NonZeroByteSlice> for NonZeroByteVec
source§fn borrow(&self) -> &NonZeroByteSlice
fn borrow(&self) -> &NonZeroByteSlice
Immutably borrows from an owned value. Read more
source§impl Debug for NonZeroByteSlice
impl Debug for NonZeroByteSlice
source§impl<'a> From<&'a CStr> for &'a NonZeroByteSlice
impl<'a> From<&'a CStr> for &'a NonZeroByteSlice
source§fn from(s: &'a CStr) -> &'a NonZeroByteSlice
fn from(s: &'a CStr) -> &'a NonZeroByteSlice
Converts to this type from the input type.
source§impl From<&NonZeroByteSlice> for NonZeroByteVec
impl From<&NonZeroByteSlice> for NonZeroByteVec
source§fn from(slice: &NonZeroByteSlice) -> NonZeroByteVec
fn from(slice: &NonZeroByteSlice) -> NonZeroByteVec
Converts to this type from the input type.
source§impl Hash for NonZeroByteSlice
impl Hash for NonZeroByteSlice
source§impl PartialEq for NonZeroByteSlice
impl PartialEq for NonZeroByteSlice
source§fn eq(&self, other: &NonZeroByteSlice) -> bool
fn eq(&self, other: &NonZeroByteSlice) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for NonZeroByteSlice
impl Serialize for NonZeroByteSlice
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
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
impl ToOwned for NonZeroByteSlice
§type Owned = NonZeroByteVec
type Owned = NonZeroByteVec
The resulting type after obtaining ownership.
source§fn to_owned(&self) -> <NonZeroByteSlice as ToOwned>::Owned
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)
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
impl<'a> TryFrom<&'a str> for &'a NonZeroByteSlice
§type Error = NullByteError
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>
fn try_from( s: &'a str ) -> Result<&'a NonZeroByteSlice, <&'a NonZeroByteSlice as TryFrom<&'a str>>::Error>
Performs the conversion.