pub trait RequestEndpointSet<S> {
const REGISTRATIONS: &'static [(&'static str, RequestEndpointPolicy)];
// Required method
async fn dispatch(
cx: RequestContext<'_, S>,
path_hash: RequestPathHash,
) -> Result<(), Decline>;
}Expand description
A compile-time set of endpoints, produced by request_endpoints!; you probably want
that macro rather than this trait directly.
Required Associated Constants§
const REGISTRATIONS: &'static [(&'static str, RequestEndpointPolicy)]
Required Methods§
async fn dispatch( cx: RequestContext<'_, S>, path_hash: RequestPathHash, ) -> Result<(), Decline>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl<S> RequestEndpointSet<S> for ()
The empty route set — what request_endpoints! with no arms hands back, and what a node
that serves no requests carries. It registers nothing and declines every request as Ignore.
impl<S> RequestEndpointSet<S> for ()
The empty route set — what request_endpoints! with no arms hands back, and what a node
that serves no requests carries. It registers nothing and declines every request as Ignore.