pub trait Handler:
Send
+ Sync
+ 'static {
// Required method
fn handle(&self, request: Request) -> impl Future<Output = Vec<u8>> + Send;
}Expand description
The application seam: turn a Request into response bytes. Nex has no
status codes, so “not found” is whatever text the handler chooses.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".