pub trait RequestEndpoint<AppState = ()> {
const ENDPOINT_ID: &'static str;
const POLICY: RequestEndpointPolicy;
// Required method
async fn handle(
context: RequestContext<'_, AppState>,
) -> Result<(), Decline>;
}Required Associated Constants§
Sourceconst ENDPOINT_ID: &'static str
const ENDPOINT_ID: &'static str
You can use whatever string value you like (it’s hashed and truncated so the wire length will be stable), but it’s common convention to use URL/filesystem-like syntax, e.g., “/example/thing”
const POLICY: RequestEndpointPolicy
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".