#[repr(transparent)]pub struct NetworkName(pub otNetworkName);
Expand description
Network Name.
Functional equivalent of otsys::otNetworkName
.
Tuple Fields§
§0: otNetworkName
Implementations§
Source§impl NetworkName
impl NetworkName
Sourcepub fn try_from_slice(slice: &[u8]) -> Result<Self, WrongSize>
pub fn try_from_slice(slice: &[u8]) -> Result<Self, WrongSize>
Tries to create a network name instance from the given byte slice.
Sourcepub fn as_slice(&self) -> &[u8] ⓘ
pub fn as_slice(&self) -> &[u8] ⓘ
Returns the network name as a byte slice with no trailing zeros.
Sourcepub fn try_as_str(&self) -> Result<&str, Utf8Error>
pub fn try_as_str(&self) -> Result<&str, Utf8Error>
Tries to return a representation of this network name as a string slice.
Trait Implementations§
Source§impl Clone for NetworkName
impl Clone for NetworkName
Source§fn clone(&self) -> NetworkName
fn clone(&self) -> NetworkName
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for NetworkName
impl Debug for NetworkName
Source§impl Default for NetworkName
impl Default for NetworkName
Source§fn default() -> NetworkName
fn default() -> NetworkName
Returns the “default value” for a type. Read more
Source§impl<'a> From<&'a NetworkName> for &'a otNetworkName
impl<'a> From<&'a NetworkName> for &'a otNetworkName
Source§fn from(x: &'a NetworkName) -> Self
fn from(x: &'a NetworkName) -> Self
Converts to this type from the input type.
Source§impl From<&NetworkName> for otNetworkName
impl From<&NetworkName> for otNetworkName
Source§fn from(x: &NetworkName) -> Self
fn from(x: &NetworkName) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a otNetworkName> for &'a NetworkName
impl<'a> From<&'a otNetworkName> for &'a NetworkName
Source§impl From<NetworkName> for otNetworkName
impl From<NetworkName> for otNetworkName
Source§fn from(x: NetworkName) -> Self
fn from(x: NetworkName) -> Self
Converts to this type from the input type.
Source§impl From<otNetworkName> for NetworkName
impl From<otNetworkName> for NetworkName
Source§impl Ord for NetworkName
impl Ord for NetworkName
Source§impl OtCastable for NetworkName
impl OtCastable for NetworkName
Source§fn as_ot_ptr(&self) -> *const Self::OtType
fn as_ot_ptr(&self) -> *const Self::OtType
Returns a pointer to the underlying
Self::OtType
instance.Source§fn as_ot_mut_ptr(&mut self) -> *mut Self::OtType
fn as_ot_mut_ptr(&mut self) -> *mut Self::OtType
Returns a mutable pointer to the underlying
Self::OtType
instance.Source§unsafe fn ref_from_ot_ptr<'a>(ptr: *const Self::OtType) -> Option<&'a Self>
unsafe fn ref_from_ot_ptr<'a>(ptr: *const Self::OtType) -> Option<&'a Self>
Creates a reference from a pointer to an
Self::OtType
. Read moreSource§unsafe fn mut_from_ot_mut_ptr<'a>(
ptr: *mut Self::OtType,
) -> Option<&'a mut Self>
unsafe fn mut_from_ot_mut_ptr<'a>( ptr: *mut Self::OtType, ) -> Option<&'a mut Self>
Creates a mut reference from a mut pointer to an
Self::OtType
. Read moreSource§fn as_ot_ref(&self) -> &Self::OtType
fn as_ot_ref(&self) -> &Self::OtType
Returns a reference to the original OpenThread type
Self::OtType
.Source§fn as_ot_mut(&mut self) -> &mut Self::OtType
fn as_ot_mut(&mut self) -> &mut Self::OtType
Returns a mutable reference to the original OpenThread type
Self::OtType
.Source§fn ref_from_ot_ref(x: &Self::OtType) -> &Self
fn ref_from_ot_ref(x: &Self::OtType) -> &Self
Casts a reference to the original OpenThread type to a reference to
Self
.Source§impl PartialEq for NetworkName
impl PartialEq for NetworkName
Source§impl PartialOrd for NetworkName
impl PartialOrd for NetworkName
Source§impl Transparent for NetworkName
impl Transparent for NetworkName
Source§impl<'a> TryFrom<&'a [u8]> for NetworkName
impl<'a> TryFrom<&'a [u8]> for NetworkName
Source§impl<'a> TryFrom<&'a str> for NetworkName
impl<'a> TryFrom<&'a str> for NetworkName
impl Copy for NetworkName
impl Eq for NetworkName
Auto Trait Implementations§
impl Freeze for NetworkName
impl RefUnwindSafe for NetworkName
impl Send for NetworkName
impl Sync for NetworkName
impl Unpin for NetworkName
impl UnwindSafe for NetworkName
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)