pub struct ErrorDecorator<E, H, HI> { /* private fields */ }
Expand description
Allows to process an error returned by a handler.
Implementations§
Trait Implementations§
Source§impl<E, H, HI> Clone for ErrorDecorator<E, H, HI>
impl<E, H, HI> Clone for ErrorDecorator<E, H, HI>
Source§impl<E, H, HI> Handler<HandlerInput> for ErrorDecorator<E, H, HI>where
E: ErrorHandler + Clone + Sync + 'static,
H: Handler<HI> + Sync + 'static,
HI: TryFromInput + Sync,
HI::Error: 'static,
H::Output: IntoHandlerResult,
impl<E, H, HI> Handler<HandlerInput> for ErrorDecorator<E, H, HI>where
E: ErrorHandler + Clone + Sync + 'static,
H: Handler<HI> + Sync + 'static,
HI: TryFromInput + Sync,
HI::Error: 'static,
H::Output: IntoHandlerResult,
Source§type Output = Result<(), HandlerError>
type Output = Result<(), HandlerError>
A future output returned by
Self::handle
method. Read moreAuto Trait Implementations§
impl<E, H, HI> Freeze for ErrorDecorator<E, H, HI>
impl<E, H, HI> RefUnwindSafe for ErrorDecorator<E, H, HI>
impl<E, H, HI> Send for ErrorDecorator<E, H, HI>
impl<E, H, HI> Sync for ErrorDecorator<E, H, HI>
impl<E, H, HI> Unpin for ErrorDecorator<E, H, HI>
impl<E, H, HI> UnwindSafe for ErrorDecorator<E, H, HI>
Blanket Implementations§
Source§impl<P, H, HI> AccessExt<P, HI> for Hwhere
H: Handler<HI>,
HI: TryFromInput,
impl<P, H, HI> AccessExt<P, HI> for Hwhere
H: Handler<HI>,
HI: TryFromInput,
Source§fn with_access_policy(
self,
policy: P,
) -> Predicate<AccessPredicate<P>, HandlerInput, Self, HI>
fn with_access_policy( self, policy: P, ) -> Predicate<AccessPredicate<P>, HandlerInput, Self, HI>
Available on crate feature
access
only.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<H, I> CommandExt<I> for Hwhere
H: Handler<I>,
I: TryFromInput,
impl<H, I> CommandExt<I> for Hwhere
H: Handler<I>,
I: TryFromInput,
Source§fn with_command<S: Into<String>>(
self,
name: S,
) -> Predicate<CommandPredicate, Command, Self, I>
fn with_command<S: Into<String>>( self, name: S, ) -> Predicate<CommandPredicate, Command, Self, I>
Shortcut to create a command handler. Read more
Source§impl<P, PI, H, HI, HS> DialogueExt<P, PI, HI, HS> for H
impl<P, PI, H, HI, HS> DialogueExt<P, PI, HI, HS> for H
Source§fn with_dialogue<B>(
self,
predicate: P,
) -> Predicate<DialoguePredicate<B, P, PI, HS>, HandlerInput, DialogueDecorator<B, Self, HI, HS>, HandlerInput>
fn with_dialogue<B>( self, predicate: P, ) -> Predicate<DialoguePredicate<B, P, PI, HS>, HandlerInput, DialogueDecorator<B, Self, HI, HS>, HandlerInput>
Available on crate feature
dialogue
only.Source§impl<E, H, HI> ErrorExt<E, HI> for Hwhere
H: Handler<HI>,
HI: TryFromInput,
impl<E, H, HI> ErrorExt<E, HI> for Hwhere
H: Handler<HI>,
HI: TryFromInput,
Source§fn on_error(self, error_handler: E) -> ErrorDecorator<E, Self, HI>
fn on_error(self, error_handler: E) -> ErrorDecorator<E, Self, HI>
A shortcut to create a new error decorator. Read more