#[repr(transparent)]pub struct ExternalRouteConfig(pub otExternalRouteConfig);
Expand description
Data type representing an external route configuration.
Functional equivalent of otsys::otExternalRouteConfig
.
Tuple Fields§
§0: otExternalRouteConfig
Implementations§
Source§impl ExternalRouteConfig
impl ExternalRouteConfig
Sourcepub fn from_prefix<T: Into<otIp6Prefix>>(prefix: T) -> ExternalRouteConfig
pub fn from_prefix<T: Into<otIp6Prefix>>(prefix: T) -> ExternalRouteConfig
Creates a default, stable ExternalRouteConfig
from the given Ip6Prefix
.
Sourcepub fn prefix(&self) -> &Ip6Prefix
pub fn prefix(&self) -> &Ip6Prefix
Returns the Ip6Prefix
for this external route configuration.
Sourcepub fn rloc16(&self) -> u16
pub fn rloc16(&self) -> u16
Returns the RLOC16 for the router that owns this external route configuration.
Sourcepub fn route_preference(&self) -> RoutePreference
pub fn route_preference(&self) -> RoutePreference
Returns the route preference.
Sourcepub fn set_route_preference(&mut self, pref: RoutePreference)
pub fn set_route_preference(&mut self, pref: RoutePreference)
Sets the route preference.
Sourcepub fn set_stable(&mut self, x: bool)
pub fn set_stable(&mut self, x: bool)
Sets the value of the stable
flag.
Sourcepub fn is_next_hop_this_device(&self) -> bool
pub fn is_next_hop_this_device(&self) -> bool
Returns true if the next hop for this route is this device.
Trait Implementations§
Source§impl Clone for ExternalRouteConfig
impl Clone for ExternalRouteConfig
Source§fn clone(&self) -> ExternalRouteConfig
fn clone(&self) -> ExternalRouteConfig
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 ExternalRouteConfig
impl Debug for ExternalRouteConfig
Source§impl Default for ExternalRouteConfig
impl Default for ExternalRouteConfig
Source§fn default() -> ExternalRouteConfig
fn default() -> ExternalRouteConfig
Returns the “default value” for a type. Read more
Source§impl Display for ExternalRouteConfig
impl Display for ExternalRouteConfig
Source§impl<'a> From<&'a ExternalRouteConfig> for &'a otExternalRouteConfig
impl<'a> From<&'a ExternalRouteConfig> for &'a otExternalRouteConfig
Source§fn from(x: &'a ExternalRouteConfig) -> Self
fn from(x: &'a ExternalRouteConfig) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a otExternalRouteConfig> for &'a ExternalRouteConfig
impl<'a> From<&'a otExternalRouteConfig> for &'a ExternalRouteConfig
Source§impl From<ExternalRouteConfig> for otExternalRouteConfig
impl From<ExternalRouteConfig> for otExternalRouteConfig
Source§fn from(x: ExternalRouteConfig) -> Self
fn from(x: ExternalRouteConfig) -> Self
Converts to this type from the input type.
Source§impl From<otExternalRouteConfig> for ExternalRouteConfig
impl From<otExternalRouteConfig> for ExternalRouteConfig
Source§impl OtCastable for ExternalRouteConfig
impl OtCastable for ExternalRouteConfig
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 ExternalRouteConfig
impl Transparent for ExternalRouteConfig
impl Copy for ExternalRouteConfig
Auto Trait Implementations§
impl Freeze for ExternalRouteConfig
impl RefUnwindSafe for ExternalRouteConfig
impl Send for ExternalRouteConfig
impl Sync for ExternalRouteConfig
impl Unpin for ExternalRouteConfig
impl UnwindSafe for ExternalRouteConfig
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
)