#[non_exhaustive]#[repr(u8)]pub enum RotationState {
Inactive = 0,
Start = 1,
Active = 2,
Stop = 3,
}Expand description
Rotation phase reported in a CrownUpdate.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Inactive = 0
Not rotating (or not diverted).
Start = 1
Rotation started.
Active = 2
Rotation ongoing.
Stop = 3
Rotation stopped.
Trait Implementations§
Source§impl Clone for RotationState
impl Clone for RotationState
Source§fn clone(&self) -> RotationState
fn clone(&self) -> RotationState
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 RotationState
Source§impl Debug for RotationState
impl Debug for RotationState
impl Eq for RotationState
Source§impl From<RotationState> for u8
impl From<RotationState> for u8
Source§fn from(enum_value: RotationState) -> Self
fn from(enum_value: RotationState) -> Self
Converts to this type from the input type.
Source§impl Hash for RotationState
impl Hash for RotationState
Source§impl PartialEq for RotationState
impl PartialEq for RotationState
impl StructuralPartialEq for RotationState
Source§impl TryFrom<u8> for RotationState
impl TryFrom<u8> for RotationState
Source§type Error = TryFromPrimitiveError<RotationState>
type Error = TryFromPrimitiveError<RotationState>
The type returned in the event of a conversion error.
Source§impl TryFromPrimitive for RotationState
impl TryFromPrimitive for RotationState
const NAME: &'static str = "RotationState"
type Primitive = u8
type Error = TryFromPrimitiveError<RotationState>
fn try_from_primitive( number: Self::Primitive, ) -> Result<Self, TryFromPrimitiveError<Self>>
Auto Trait Implementations§
impl Freeze for RotationState
impl RefUnwindSafe for RotationState
impl Send for RotationState
impl Sync for RotationState
impl Unpin for RotationState
impl UnsafeUnpin for RotationState
impl UnwindSafe for RotationState
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