pub struct WaitOneTimeout<A: TimerAccess, T> { /* private fields */ }Expand description
一次交值的带超时等待,正常返回原值,原等待错误保留为WaitTimeoutError::Wait。 超时返回Elapsed,计时设施失败返回Timer;关闭后未取得接受许可的交值按原关闭规则失败并返还输入值。 超时或释放(drop)不回退此前已接受的并发交值;发送成功不承诺等待方已取得该值。
Trait Implementations§
Source§impl<A: TimerAccess, T> Future for WaitOneTimeout<A, T>
impl<A: TimerAccess, T> Future for WaitOneTimeout<A, T>
Source§type Output = Result<T, WaitTimeoutError>
type Output = Result<T, WaitTimeoutError>
The type of value produced on completion.
Auto Trait Implementations§
impl<A, T> !RefUnwindSafe for WaitOneTimeout<A, T>
impl<A, T> !UnwindSafe for WaitOneTimeout<A, T>
impl<A, T> Forget for WaitOneTimeout<A, T>
impl<A, T> Freeze for WaitOneTimeout<A, T>
impl<A, T> Move for WaitOneTimeout<A, T>
impl<A, T> Send for WaitOneTimeout<A, T>
impl<A, T> Sync for WaitOneTimeout<A, T>
impl<A, T> Unpin for WaitOneTimeout<A, T>
impl<A, T> UnsafeUnpin for WaitOneTimeout<A, T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<F> IntoFuture for Fwhere
F: Future,
impl<F> IntoFuture for Fwhere
F: Future,
Source§type IntoFuture = F
type IntoFuture = F
Which kind of future are we turning this into?
Source§fn into_future(self) -> <F as IntoFuture>::IntoFuture
fn into_future(self) -> <F as IntoFuture>::IntoFuture
Creates a future from a value. Read more