pub trait DelayMs {
type Delay;
type Error;
// Required methods
fn start(&mut self, ms: Self::Delay) -> Result<(), Self::Error>;
fn poll_delay_ms(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
) -> Poll<Result<(), Self::Error>>;
fn cancel(&mut self) -> Result<(), Self::Error>;
// Provided methods
fn poll_delay_ms_unpin(
&mut self,
cx: &mut Context<'_>,
) -> Poll<Result<(), Self::Error>>
where Self: Unpin { ... }
fn delay_ms(&mut self, ms: Self::Delay) -> DelayMsFuture<'_, Self> ⓘ
where Self: Unpin { ... }
}
Available on crate feature
delay
only.Required Associated Types§
Required Methods§
Provided Methods§
fn poll_delay_ms_unpin(
&mut self,
cx: &mut Context<'_>,
) -> Poll<Result<(), Self::Error>>where
Self: Unpin,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.