#[repr(transparent)]pub struct Ip6Prefix(pub otIp6Prefix);
Expand description
IPv6 subnet prefix with an arbitrary prefix length.
Functional equivalent of otsys::otIp6Prefix
.
Tuple Fields§
§0: otIp6Prefix
Implementations§
Source§impl Ip6Prefix
impl Ip6Prefix
Sourcepub fn new<T: Into<Ip6Address>>(addr: T, prefix_len: u8) -> Ip6Prefix
pub fn new<T: Into<Ip6Address>>(addr: T, prefix_len: u8) -> Ip6Prefix
Creates a new Ip6Prefix
from an Ipv6 address and prefix length.
Sourcepub fn addr(&self) -> &Ip6Address
pub fn addr(&self) -> &Ip6Address
Returns a reference to the IPv6 address.
Sourcepub fn prefix_len(&self) -> u8
pub fn prefix_len(&self) -> u8
Returns the prefix length.
Trait Implementations§
Source§impl From<Ip6Prefix> for Ipv6AddressWithPrefix
impl From<Ip6Prefix> for Ipv6AddressWithPrefix
Source§impl From<Ipv6AddressWithPrefix> for Ip6Prefix
impl From<Ipv6AddressWithPrefix> for Ip6Prefix
Source§fn from(x: Ipv6AddressWithPrefix) -> Self
fn from(x: Ipv6AddressWithPrefix) -> Self
Converts to this type from the input type.
Source§impl OtCastable for Ip6Prefix
impl OtCastable for Ip6Prefix
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 Ip6Prefix
impl Transparent for Ip6Prefix
impl Copy for Ip6Prefix
impl Eq for Ip6Prefix
Auto Trait Implementations§
impl Freeze for Ip6Prefix
impl RefUnwindSafe for Ip6Prefix
impl Send for Ip6Prefix
impl Sync for Ip6Prefix
impl Unpin for Ip6Prefix
impl UnwindSafe for Ip6Prefix
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
)