pub enum PollPersist<T: Future> {
Pending(Pin<Box<T>>),
Ready(T::Output),
}Expand description
A persistent future that can be polled multiple times.
When resolved, this future will update itself to store the resolved value. This allows it to be polled multiple times without cloning. Any resolution after the first will be completed immediately.
Variants§
Pending(Pin<Box<T>>)
The future has not been resolved yet.
Ready(T::Output)
The future has been resolved.
Implementations§
Auto Trait Implementations§
impl<T> Freeze for PollPersist<T>
impl<T> RefUnwindSafe for PollPersist<T>
impl<T> Send for PollPersist<T>
impl<T> Sync for PollPersist<T>
impl<T> Unpin for PollPersist<T>
impl<T> UnwindSafe for PollPersist<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