Struct AnyUart Copy item path
Summary Source pub struct AnyUart<'d>();
Expand description Any UART peripheral.
This struct is a type-erased version of a peripheral singleton. It is useful
for creating arrays of peripherals, or avoiding generics. Peripheral singletons
can be type erased by using their From
implementation.
ⓘ let any_peripheral = AnyUart::from(peripheral);
Unsafely clone this peripheral reference.
§ Safety
You must ensure that you’re only using one instance of this type at a time.
Creates a new peripheral reference with a shorter lifetime.
Use this method if you would like to keep working with the peripheral after
you dropped the driver that consumes this.
Formats the value using the given formatter.
Read more Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Immutably borrows from an owned value.
Read more Mutably borrows from an owned value.
Read more Returns the argument unchanged.
Calls U::from(self)
.
That is, this conversion is whatever the implementation of
[From]<T> for U
chooses to do.
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.