pub struct Ip6AddressInfo<'a>(/* private fields */);
Expand description
Data type representing IPv6 address information.
Functional equivalent of otsys::otIp6AddressInfo
.
Note that this type has a lifetime because the original OpenThread
type includes a pointer to the IPv6 address.
Implementations§
Source§impl<'a> Ip6AddressInfo<'a>
impl<'a> Ip6AddressInfo<'a>
Sourcepub fn addr(&self) -> &'a Ip6Address
pub fn addr(&self) -> &'a Ip6Address
Returns a reference to the Ip6Address
.
Sourcepub fn is_preferred(&self) -> bool
pub fn is_preferred(&self) -> bool
Returns true if this address is preferred.
Sourcepub fn prefix_len(&self) -> u8
pub fn prefix_len(&self) -> u8
Returns the prefix length of this address.
Sourcepub fn is_multicast(&self) -> bool
pub fn is_multicast(&self) -> bool
Returns true if this address is a multicast address.
Trait Implementations§
Source§impl<'a> Clone for Ip6AddressInfo<'a>
impl<'a> Clone for Ip6AddressInfo<'a>
Source§fn clone(&self) -> Ip6AddressInfo<'a>
fn clone(&self) -> Ip6AddressInfo<'a>
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 Ip6AddressInfo<'_>
impl Debug for Ip6AddressInfo<'_>
Source§impl<'a> Default for Ip6AddressInfo<'a>
impl<'a> Default for Ip6AddressInfo<'a>
Source§fn default() -> Ip6AddressInfo<'a>
fn default() -> Ip6AddressInfo<'a>
Returns the “default value” for a type. Read more
Source§impl OtCastable for Ip6AddressInfo<'_>
impl OtCastable for Ip6AddressInfo<'_>
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 Transparent for Ip6AddressInfo<'_>
impl Transparent for Ip6AddressInfo<'_>
impl<'a> Copy for Ip6AddressInfo<'a>
Auto Trait Implementations§
impl<'a> Freeze for Ip6AddressInfo<'a>
impl<'a> RefUnwindSafe for Ip6AddressInfo<'a>
impl<'a> !Send for Ip6AddressInfo<'a>
impl<'a> !Sync for Ip6AddressInfo<'a>
impl<'a> Unpin for Ip6AddressInfo<'a>
impl<'a> UnwindSafe for Ip6AddressInfo<'a>
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
)