pub enum RouteHandler {
Sync(Box<dyn Fn(&mut NgynContext<'_>) -> Box<dyn ToBytes> + Send + Sync + 'static>),
Async(Box<dyn for<'a, 'b> Fn(&'a mut NgynContext<'_>) -> Pin<Box<dyn Future<Output = Box<dyn ToBytes>> + Send + 'a>> + Send + Sync>),
}Variants§
Sync(Box<dyn Fn(&mut NgynContext<'_>) -> Box<dyn ToBytes> + Send + Sync + 'static>)
Async(Box<dyn for<'a, 'b> Fn(&'a mut NgynContext<'_>) -> Pin<Box<dyn Future<Output = Box<dyn ToBytes>> + Send + 'a>> + Send + Sync>)
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for RouteHandler
impl !UnwindSafe for RouteHandler
impl Freeze for RouteHandler
impl Send for RouteHandler
impl Sync for RouteHandler
impl Unpin for RouteHandler
impl UnsafeUnpin for RouteHandler
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