Skip to main content

RequestEndpointSet

Trait RequestEndpointSet 

Source
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§

Source

const REGISTRATIONS: &'static [(&'static str, RequestEndpointPolicy)]

Required Methods§

Source

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.

Source§

const REGISTRATIONS: &'static [(&'static str, RequestEndpointPolicy)]

Source§

async fn dispatch( _cx: RequestContext<'_, S>, _path_hash: RequestPathHash, ) -> Result<(), Decline>

Implementors§