pub enum Role {
Detached,
EndDevice,
Router,
SleepyEndDevice,
SleepyRouter,
Leader,
Coordinator,
// some variants omitted
}
Expand description
LoWPAN Role Type.
This type describes the role a device can assume on a network.
Variants§
Detached
Detached role. The interface is not currently participating on the network, either because it cannot find a parent
EndDevice
End-device role. End devices do not route traffic on behalf of other nodes.
Router
Router role. Routers help route traffic around the mesh network.
Note that this role is independent of the device being a “border router”.
Not all network types support this role.
SleepyEndDevice
Sleepy End-Device role.
End devices with this role are nominally asleep, waking up periodically to check in with their parent to see if there are packets destined for them. Such devices are capable of extraordinarily low power consumption, but packet latency can be on the order of dozens of seconds(depending on how the node is configured). Not all network types support this role.
Not all network types support this role.
SleepyRouter
Sleepy-router role.
Routers with this role are nominally asleep, waking up periodically to check in with other routers and their children.
Not all network types support this role.
Leader
Leader role.
On Thread networks, for each partition/fragment one router is designated as the “leader”, which means that it is considered authoritative for all network data. In most cases this role can be considered as a synonym to Role::ROUTER.
Not all network types support this role.
Coordinator
Coordinator role.
Not all network types support this role.
Implementations§
Source§impl Role
impl Role
pub fn from_primitive(prim: i32) -> Option<Self>
pub fn from_primitive_allow_unknown(prim: i32) -> Self
pub fn unknown() -> Self
pub const fn into_primitive(self) -> i32
pub fn is_unknown(&self) -> bool
Trait Implementations§
Source§impl<D: ResourceDialect> Decode<Role, D> for Role
impl<D: ResourceDialect> Decode<Role, D> for Role
Source§impl Ord for Role
impl Ord for Role
Source§impl PartialOrd for Role
impl PartialOrd for Role
Source§impl TypeMarker for Role
impl TypeMarker for Role
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.Source§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read moreSource§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.Source§impl ValueTypeMarker for Role
impl ValueTypeMarker for Role
impl Copy for Role
impl Eq for Role
impl StructuralPartialEq for Role
Auto Trait Implementations§
impl Freeze for Role
impl RefUnwindSafe for Role
impl Send for Role
impl Sync for Role
impl Unpin for Role
impl UnwindSafe for Role
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
)