pub enum PowerUpState {
Unknown,
Regular,
BatteryDrain,
// some variants omitted
}Expand description
Indicates the power-up state of the timer hardware at boot.
Variants§
Unknown
The power-up state is unknown or not reported by the hardware.
Regular
The hardware powered up normally (backup power was maintained).
BatteryDrain
The hardware powered up after a battery drain or full power loss (backup domain registers were reset).
Implementations§
Source§impl PowerUpState
impl PowerUpState
pub fn from_primitive(prim: u32) -> Option<Self>
pub fn from_primitive_allow_unknown(prim: u32) -> Self
pub fn unknown() -> Self
pub const fn into_primitive(self) -> u32
pub fn is_unknown(&self) -> bool
Trait Implementations§
Source§impl Clone for PowerUpState
impl Clone for PowerUpState
impl Copy for PowerUpState
Source§impl Debug for PowerUpState
impl Debug for PowerUpState
Source§impl<D: ResourceDialect> Decode<PowerUpState, D> for PowerUpState
impl<D: ResourceDialect> Decode<PowerUpState, D> for PowerUpState
Source§impl<D: ResourceDialect> Encode<PowerUpState, D> for PowerUpState
impl<D: ResourceDialect> Encode<PowerUpState, D> for PowerUpState
impl Eq for PowerUpState
Source§impl Hash for PowerUpState
impl Hash for PowerUpState
Source§impl Ord for PowerUpState
impl Ord for PowerUpState
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for PowerUpState
impl PartialEq for PowerUpState
Source§impl PartialOrd for PowerUpState
impl PartialOrd for PowerUpState
impl StructuralPartialEq for PowerUpState
Source§impl TypeMarker for PowerUpState
impl TypeMarker for PowerUpState
Source§type Owned = PowerUpState
type Owned = PowerUpState
The owned Rust type which this FIDL type decodes into.
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Returns the minimum required alignment of the inline portion of the
encoded object. It must be a (nonzero) power of two.
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
Returns the size of the inline portion of the encoded object, including
padding for alignment. Must be a multiple of
inline_align.Source§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Returns true if the memory layout of
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
Returns true if the memory layout of
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 PowerUpState
impl ValueTypeMarker for PowerUpState
Source§type Borrowed<'a> = PowerUpState
type Borrowed<'a> = PowerUpState
The Rust type to use for encoding. This is a particular
Encode<Self>
type cheaply obtainable from &Self::Owned. There are three cases: Read moreAuto Trait Implementations§
impl Freeze for PowerUpState
impl RefUnwindSafe for PowerUpState
impl Send for PowerUpState
impl Sync for PowerUpState
impl Unpin for PowerUpState
impl UnsafeUnpin for PowerUpState
impl UnwindSafe for PowerUpState
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