pub struct FnHandler<J, F> { /* private fields */ }Expand description
Blanket adapter so plain async closures can be handlers:
builder.handler(FnHandler::<SendEmail, _>::new(|job, ctx| async move { ... })).
Implementations§
Trait Implementations§
Source§impl<J, F, Fut> JobHandler for FnHandler<J, F>
impl<J, F, Fut> JobHandler for FnHandler<J, F>
Auto Trait Implementations§
impl<J, F> Freeze for FnHandler<J, F>
impl<J, F> RefUnwindSafe for FnHandler<J, F>
impl<J, F> Send for FnHandler<J, F>
impl<J, F> Sync for FnHandler<J, F>
impl<J, F> Unpin for FnHandler<J, F>
impl<J, F> UnsafeUnpin for FnHandler<J, F>
impl<J, F> UnwindSafe for FnHandler<J, F>
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