#[repr(transparent)]pub struct BorderRouterConfig(pub otBorderRouterConfig);
Expand description
Functional equivalent of otsys::otBorderRouterConfig
.
Tuple Fields§
§0: otBorderRouterConfig
Implementations§
Source§impl BorderRouterConfig
impl BorderRouterConfig
Sourcepub fn from_prefix(prefix: Ip6Prefix) -> BorderRouterConfig
pub fn from_prefix(prefix: Ip6Prefix) -> BorderRouterConfig
Creates a new default BorderRouterConfig
(with no flags set)
from the given Ip6Prefix
.
Sourcepub fn slaac_from_prefix(prefix: Ip6Prefix) -> BorderRouterConfig
pub fn slaac_from_prefix(prefix: Ip6Prefix) -> BorderRouterConfig
Creates a new SLAAC BorderRouterConfig
from the given Ip6Prefix
.
Sourcepub fn prefix(&self) -> &Ip6Prefix
pub fn prefix(&self) -> &Ip6Prefix
Returns a reference to the Ip6Prefix
for this BorderRouterConfig
.
Sourcepub fn rloc16(&self) -> u16
pub fn rloc16(&self) -> u16
Returns the RLOC16 for the parent router that owns this BorderRouterConfig
.
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_dhcp(&self) -> bool
pub fn is_dhcp(&self) -> bool
Returns the value of the dhcp
flag.
If this flag is set, addresses are managed and assigned by a DHCP server.
Sourcepub fn set_nd_dns(&mut self, x: bool)
pub fn set_nd_dns(&mut self, x: bool)
Sets the value of the nd_dns
flag.
Sourcepub fn default_route_preference(&self) -> Option<RoutePreference>
pub fn default_route_preference(&self) -> Option<RoutePreference>
Returns the routing preference for this BorderRouterConfig
.
If this config is not a default route, returns None
.
Sourcepub fn set_default_route_preference(&mut self, pref: Option<RoutePreference>)
pub fn set_default_route_preference(&mut self, pref: Option<RoutePreference>)
If a value is provided, sets the default route flag and default route preference. Otherwise the default route flag is cleared.
Sourcepub fn is_slaac(&self) -> bool
pub fn is_slaac(&self) -> bool
Returns the value of the slaac
flag.
If this flag is set, addresses self-assigned using SLAAC.
Sourcepub fn is_preferred(&self) -> bool
pub fn is_preferred(&self) -> bool
Returns the value of the preferred
flag.
Sourcepub fn set_preferred(&mut self, x: bool)
pub fn set_preferred(&mut self, x: bool)
Sets the value of the preferred
flag.
Sourcepub fn is_on_mesh(&self) -> bool
pub fn is_on_mesh(&self) -> bool
Returns the value of the on_mesh
flag.
Sourcepub fn set_on_mesh(&mut self, x: bool)
pub fn set_on_mesh(&mut self, x: bool)
Sets the value of the on_mesh
flag.
Sourcepub fn is_domain_prefix(&self) -> bool
pub fn is_domain_prefix(&self) -> bool
Returns the value of the dp
(domain prefix) flag.
Sourcepub fn set_domain_prefix(&mut self, x: bool)
pub fn set_domain_prefix(&mut self, x: bool)
Sets the value of the dp
(domain prefix) flag.
Trait Implementations§
Source§impl Clone for BorderRouterConfig
impl Clone for BorderRouterConfig
Source§fn clone(&self) -> BorderRouterConfig
fn clone(&self) -> BorderRouterConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for BorderRouterConfig
impl Debug for BorderRouterConfig
Source§impl Default for BorderRouterConfig
impl Default for BorderRouterConfig
Source§fn default() -> BorderRouterConfig
fn default() -> BorderRouterConfig
Source§impl Display for BorderRouterConfig
impl Display for BorderRouterConfig
Source§impl<'a> From<&'a BorderRouterConfig> for &'a otBorderRouterConfig
impl<'a> From<&'a BorderRouterConfig> for &'a otBorderRouterConfig
Source§fn from(x: &'a BorderRouterConfig) -> Self
fn from(x: &'a BorderRouterConfig) -> Self
Source§impl<'a> From<&'a otBorderRouterConfig> for &'a BorderRouterConfig
impl<'a> From<&'a otBorderRouterConfig> for &'a BorderRouterConfig
Source§impl From<BorderRouterConfig> for otBorderRouterConfig
impl From<BorderRouterConfig> for otBorderRouterConfig
Source§fn from(x: BorderRouterConfig) -> Self
fn from(x: BorderRouterConfig) -> Self
Source§impl From<otBorderRouterConfig> for BorderRouterConfig
impl From<otBorderRouterConfig> for BorderRouterConfig
Source§impl OtCastable for BorderRouterConfig
impl OtCastable for BorderRouterConfig
Source§fn as_ot_ptr(&self) -> *const Self::OtType
fn as_ot_ptr(&self) -> *const Self::OtType
Self::OtType
instance.Source§fn as_ot_mut_ptr(&mut self) -> *mut Self::OtType
fn as_ot_mut_ptr(&mut self) -> *mut Self::OtType
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>
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>
Self::OtType
. Read moreSource§fn as_ot_ref(&self) -> &Self::OtType
fn as_ot_ref(&self) -> &Self::OtType
Self::OtType
.Source§fn as_ot_mut(&mut self) -> &mut Self::OtType
fn as_ot_mut(&mut self) -> &mut Self::OtType
Self::OtType
.Source§fn ref_from_ot_ref(x: &Self::OtType) -> &Self
fn ref_from_ot_ref(x: &Self::OtType) -> &Self
Self
.Source§impl Transparent for BorderRouterConfig
impl Transparent for BorderRouterConfig
impl Copy for BorderRouterConfig
Auto Trait Implementations§
impl Freeze for BorderRouterConfig
impl RefUnwindSafe for BorderRouterConfig
impl Send for BorderRouterConfig
impl Sync for BorderRouterConfig
impl Unpin for BorderRouterConfig
impl UnwindSafe for BorderRouterConfig
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
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)
clone_to_uninit
)