pub trait FnContextSendSyncStatic<Fut, T>: FnContextSendSync<Fut> + 'static{ }Expand description
A trait for static, sendable, synchronous functions that return a future.
This trait ensures that a handler function is safe to be sent across threads and has a static lifetime, making it suitable for use in long-lived components of the application, such as the main router.
Implementors§
impl<F, Fut, T> FnContextSendSyncStatic<Fut, T> for F
A blanket implementation for static, sendable, synchronous functions that return a future.
This trait is used for handlers that are known at compile time, ensuring they are safe to be sent across threads and have a static lifetime. This is crucial for handlers that are part of the application’s long-lived state.