pub struct ExceptionHandler<F> { /* private fields */ }Expand description
ExceptionHandler 中间件
use silent::prelude::*;
use silent::middlewares::{ExceptionHandler};
// Define a custom error handler function
let _ = ExceptionHandler::new(|res, _configs| async {res});Implementations§
Trait Implementations§
Source§impl<F: Clone> Clone for ExceptionHandler<F>
impl<F: Clone> Clone for ExceptionHandler<F>
Source§fn clone(&self) -> ExceptionHandler<F>
fn clone(&self) -> ExceptionHandler<F>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<F: Default> Default for ExceptionHandler<F>
impl<F: Default> Default for ExceptionHandler<F>
Source§fn default() -> ExceptionHandler<F>
fn default() -> ExceptionHandler<F>
Returns the “default value” for a type. Read more
Source§impl<F, Fut, T> MiddleWareHandler for ExceptionHandler<F>
impl<F, Fut, T> MiddleWareHandler for ExceptionHandler<F>
Auto Trait Implementations§
impl<F> Freeze for ExceptionHandler<F>
impl<F> RefUnwindSafe for ExceptionHandler<F>where
F: RefUnwindSafe,
impl<F> Send for ExceptionHandler<F>
impl<F> Sync for ExceptionHandler<F>
impl<F> Unpin for ExceptionHandler<F>
impl<F> UnsafeUnpin for ExceptionHandler<F>
impl<F> UnwindSafe for ExceptionHandler<F>where
F: RefUnwindSafe,
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