pub struct FnHandler<F, Args> { /* private fields */ }
Expand description
A wrapper type that converts async functions into request handlers.
This allows regular async functions to be used as request handlers
by implementing the RequestHandler
trait for them.
Type parameters:
F
: The async function typeArgs
: The function arguments type
Auto Trait Implementations§
impl<F, Args> Freeze for FnHandler<F, Args>where
F: Freeze,
impl<F, Args> RefUnwindSafe for FnHandler<F, Args>where
F: RefUnwindSafe,
impl<F, Args> Send for FnHandler<F, Args>where
F: Send,
impl<F, Args> Sync for FnHandler<F, Args>where
F: Sync,
impl<F, Args> Unpin for FnHandler<F, Args>where
F: Unpin,
impl<F, Args> UnwindSafe for FnHandler<F, Args>where
F: UnwindSafe,
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