Type Alias MeshLocalPrefix

Source
pub type MeshLocalPrefix = Ip6NetworkPrefix;
Expand description

Mesh-Local Prefix.

Same type as Ip6NetworkPrefix. Functional equivalent of otsys::otMeshLocalPrefix.

Aliased Type§

struct MeshLocalPrefix(pub otIp6NetworkPrefix);

Fields§

§0: otIp6NetworkPrefix

Implementations

Source§

impl Ip6NetworkPrefix

Source

pub fn as_slice(&self) -> &[u8]

Returns this network prefix as a byte slice.

Source

pub fn octets(&self) -> [u8; 8]

Returns this network prefix as an 8-byte array by value.

Source

pub fn contains(&self, addr: &Ipv6Addr) -> bool

Returns true is the given address is in this network prefix.

Trait Implementations

Source§

impl Clone for Ip6NetworkPrefix

Source§

fn clone(&self) -> Ip6NetworkPrefix

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Ip6NetworkPrefix

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

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

impl Default for Ip6NetworkPrefix

Source§

fn default() -> Ip6NetworkPrefix

Returns the “default value” for a type. Read more
Source§

impl Display for Ip6NetworkPrefix

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

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

impl From<[u8; 8]> for Ip6NetworkPrefix

Source§

fn from(m8: [u8; 8]) -> Self

Converts to this type from the input type.
Source§

impl From<Ipv6Addr> for Ip6NetworkPrefix

Source§

fn from(x: Ipv6Addr) -> Self

Converts to this type from the input type.
Source§

impl From<Ipv6Address> for Ip6NetworkPrefix

Source§

fn from(x: Ipv6Address) -> Self

Extracts the first 64 bits of a fidl_fuchsia_net::Ipv6Address to make a Ip6NetworkPrefix.

Source§

impl From<otIp6NetworkPrefix> for Ip6NetworkPrefix

Source§

fn from(x: otIp6NetworkPrefix) -> Self

Converts to this type from the input type.
Source§

impl OtCastable for Ip6NetworkPrefix

Source§

type OtType = otIp6NetworkPrefix

Original OpenThread Type.
Source§

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

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>

Creates a reference from a pointer to an Self::OtType. Read more
Source§

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 more
Source§

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

Returns a mutable reference to the original OpenThread type Self::OtType.
Source§

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 Ip6NetworkPrefix

Source§

fn eq(&self, other: &Self) -> 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 Transparent for Ip6NetworkPrefix

Source§

fn from_ot(x: Self::OtType) -> Self

Creates a new instance from an instance of [Self::OtType].
Source§

fn into_ot(self) -> Self::OtType

Converts this type into an instance of [Self::OtType].
Source§

impl Copy for Ip6NetworkPrefix

Source§

impl Eq for Ip6NetworkPrefix