pub enum HookHandler {
Function(fn(Context) -> PinBoxFutureSend<()>),
Handler(Arc<dyn Fn(&Context) -> PinBoxFutureSend<()> + Send + Sync>),
}Expand description
Represents different handler types for hooks.
Variants§
Function(fn(Context) -> PinBoxFutureSend<()>)
Function-based handler (used for panic hooks)
Handler(Arc<dyn Fn(&Context) -> PinBoxFutureSend<()> + Send + Sync>)
Arc handler (used for request/response middleware and routes)
Trait Implementations§
Source§impl Clone for HookHandler
impl Clone for HookHandler
Source§fn clone(&self) -> HookHandler
fn clone(&self) -> HookHandler
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 Debug for HookHandler
impl Debug for HookHandler
Source§impl PartialEq for HookHandler
impl PartialEq for HookHandler
impl Eq for HookHandler
Auto Trait Implementations§
impl Freeze for HookHandler
impl !RefUnwindSafe for HookHandler
impl Send for HookHandler
impl Sync for HookHandler
impl Unpin for HookHandler
impl !UnwindSafe for HookHandler
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