pub struct ErrorCapture<ErrorT> { /* private fields */ }Available on crate feature
async-utils only.Expand description
Utility to capture errors and propagate them to an associated ErrorHandle.
Implementations§
Source§impl<ErrorT> ErrorCapture<ErrorT>
impl<ErrorT> ErrorCapture<ErrorT>
pub fn new() -> (Self, ErrorHandle<ErrorT>)
Sourcepub async fn wrap_future<F, O>(self, fut: F)
pub async fn wrap_future<F, O>(self, fut: F)
Wraps a future such that its error result is sent to the associated ErrorHandle.
Trait Implementations§
Auto Trait Implementations§
impl<ErrorT> Freeze for ErrorCapture<ErrorT>
impl<ErrorT> RefUnwindSafe for ErrorCapture<ErrorT>
impl<ErrorT> Send for ErrorCapture<ErrorT>where
ErrorT: Send,
impl<ErrorT> Sync for ErrorCapture<ErrorT>where
ErrorT: Send,
impl<ErrorT> Unpin for ErrorCapture<ErrorT>
impl<ErrorT> UnwindSafe for ErrorCapture<ErrorT>
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more