pub enum RelayTransition {
Promoted {
connection_count: usize,
battery_level: u8,
},
Demoted(RelayDemotionReason),
}Expand description
A relay-role transition produced by RelayManager::evaluate_transition.
None from evaluate_transition means the role did not change; a Some
value is emitted exactly once, at the tick the transition happens.
Variants§
Promoted
The device became a relay.
Fields
Demoted(RelayDemotionReason)
The device stopped being a relay.
Trait Implementations§
Source§impl Clone for RelayTransition
impl Clone for RelayTransition
Source§fn clone(&self) -> RelayTransition
fn clone(&self) -> RelayTransition
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for RelayTransition
Source§impl Debug for RelayTransition
impl Debug for RelayTransition
impl Eq for RelayTransition
Source§impl PartialEq for RelayTransition
impl PartialEq for RelayTransition
impl StructuralPartialEq for RelayTransition
Auto Trait Implementations§
impl Freeze for RelayTransition
impl RefUnwindSafe for RelayTransition
impl Send for RelayTransition
impl Sync for RelayTransition
impl Unpin for RelayTransition
impl UnsafeUnpin for RelayTransition
impl UnwindSafe for RelayTransition
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