Enum tcn75a::FaultQueue [−][src]
pub enum FaultQueue { One, Two, Four, Six, }
Expand description
Fault Queue bits in the Sensor Configuration Register.
Consult the TCN75A datasheet for information on the meanings of each variant. Variant names will be similar to the datasheet (changes in the datasheet names in subsequent silicon revisions may constitute a breaking API change).
Examples
You can convert the u8
values 1
, 2
, 4
, and 6
into a FaultQueue
and
vice-versa using TryFrom<u8>
and From<FaultQueue>
respectively:
let fq: FaultQueue = 1u8.try_into().unwrap(); let fq_as_int: u8 = FaultQueue::Two.into(); let try_fq_fail: Result<FaultQueue, ConfigRegValueError> = 8u8.try_into(); assert_eq!(fq, FaultQueue::One); assert_eq!(fq_as_int, 2u8); assert!(try_fq_fail.is_err());
Variants
Trait Implementations
Performs the conversion.
type Error = ConfigRegValueError
type Error = ConfigRegValueError
The type returned in the event of a conversion error.
Auto Trait Implementations
impl RefUnwindSafe for FaultQueue
impl Send for FaultQueue
impl Sync for FaultQueue
impl Unpin for FaultQueue
impl UnwindSafe for FaultQueue
Blanket Implementations
Mutably borrows from an owned value. Read more
Casts the value.
Performs the conversion.
Performs the conversion.
Casts the value.
type Output = T
type Output = T
Should always be Self
Casts the value.
Casts the value.
Casts the value.