OneWireError

Enum OneWireError 

Source
pub enum OneWireError<E> {
    Other(E),
    NoDevicePresent,
    BusInUse,
    BusUninitialized,
    BusInvalidSpeed,
    ShortCircuit,
    Unimplemented,
    InvalidCrc,
    InvalidValue(&'static str),
}
Expand description

One wire communication error type.

Variants§

§

Other(E)

Encapsulates the error type from the underlying hardware.

§

NoDevicePresent

Indicates that no device is present on the bus.

§

BusInUse

Indicates that the bus is busy, which may happen if a device is already communicating.

§

BusUninitialized

Indicates that the bus is not initialized, which may happen if the bus master has come out of a reset, but the 1-Wire port has not been configured.

§

BusInvalidSpeed

Indicates that the current bus speed is invalid for the operation.

§

ShortCircuit

Indicates that a short circuit was detected on the bus.

§

Unimplemented

Indicates that the operation is not implemented, such as reading a triplet when not supported.

§

InvalidCrc

Computed CRC of the ROM is invalid.

§

InvalidValue(&'static str)

Invalid value

Trait Implementations§

Source§

impl<E: Debug> Debug for OneWireError<E>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<E> From<E> for OneWireError<E>

Source§

fn from(other: E) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<E> Freeze for OneWireError<E>
where E: Freeze,

§

impl<E> RefUnwindSafe for OneWireError<E>
where E: RefUnwindSafe,

§

impl<E> Send for OneWireError<E>
where E: Send,

§

impl<E> Sync for OneWireError<E>
where E: Sync,

§

impl<E> Unpin for OneWireError<E>
where E: Unpin,

§

impl<E> UnwindSafe for OneWireError<E>
where E: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<!> for T

Source§

fn from(t: !) -> T

Converts to this type from the input type.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.