type InnerFuture<'a, T> = ReusableBoxFuture<'a, Result<OwnedPermit<T>, PollSendError<T>>>;
Aliased Type§
struct InnerFuture<'a, T> {
boxed: Pin<Box<dyn Future<Output = Result<OwnedPermit<T>, PollSendError<T>>> + Send + 'a>>,
}
Fields§
§boxed: Pin<Box<dyn Future<Output = Result<OwnedPermit<T>, PollSendError<T>>> + Send + 'a>>
Implementations
Source§impl<'a, T> ReusableBoxFuture<'a, T>
impl<'a, T> ReusableBoxFuture<'a, T>
Sourcepub fn new<F>(future: F) -> Self
pub fn new<F>(future: F) -> Self
Create a new ReusableBoxFuture<T>
containing the provided future.
Sourcepub fn set<F>(&mut self, future: F)
pub fn set<F>(&mut self, future: F)
Replace the future currently stored in this box.
This reallocates if and only if the layout of the provided future is different from the layout of the currently stored future.
Sourcepub fn try_set<F>(&mut self, future: F) -> Result<(), F>
pub fn try_set<F>(&mut self, future: F) -> Result<(), F>
Replace the future currently stored in this box.
This function never reallocates, but returns an error if the provided future has a different size or alignment from the currently stored future.