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

One
Two
Four
Six

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

The amount of bits used by the specifier.

The base type of the specifier. Read more

The interface type of the specifier. Read more

Converts some bytes into the in-out type. Read more

Converts the given bytes into the in-out type. Read more

The type returned in the event of a conversion error.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Casts the value.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Casts the value.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Casts the value.

Should always be Self

Casts the value.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Casts the value.

Casts the value.