Trait tokio_i2c::prelude::future::FutureFrom
source · pub trait FutureFrom<T>: Sized {
type Future: Future<Item = Self, Error = Self::Error>;
type Error;
fn future_from(_: T) -> Self::Future;
}
Expand description
Asynchronous conversion from a type T
.
This trait is analogous to std::convert::From
, adapted to asynchronous
computation.
Required Associated Types§
Required Methods§
sourcefn future_from(_: T) -> Self::Future
fn future_from(_: T) -> Self::Future
Consume the given value, beginning the conversion.