pub trait CreateRouteNode: Sized {
// Required methods
fn at<H, T, R>(self, handler: H) -> RouteNode
where H: Handler<T, R>,
T: Extractor,
R: Responder;
fn post<H, T, R>(self, handler: H) -> RouteNode
where H: Handler<T, R>,
T: Extractor,
R: Responder;
fn put<H, T, R>(self, handler: H) -> RouteNode
where H: Handler<T, R>,
T: Extractor,
R: Responder;
fn delete<H, T, R>(self, handler: H) -> RouteNode
where H: Handler<T, R>,
T: Extractor,
R: Responder;
fn route(self, routes: impl Routes) -> RouteNode;
fn endpoint<E>(self, method: Method, endpoint: E) -> RouteNode
where E: Endpoint + Clone + Send + Sync + 'static;
// Provided methods
fn get<H, T, R>(self, handler: H) -> RouteNode
where H: Handler<T, R>,
T: Extractor,
R: Responder { ... }
fn ws<F, Fut>(self, handler: F) -> RouteNode
where F: Fn(WebSocket) -> Fut + Clone + Send + Sync + 'static,
Fut: Future<Output = ()> + Send + 'static { ... }
}Expand description
Builder extension that turns a path literal into convenient routing nodes.
Required Methods§
Sourcefn route(self, routes: impl Routes) -> RouteNode
fn route(self, routes: impl Routes) -> RouteNode
Mount nested routes under the current path segment.
Provided Methods§
Sourcefn get<H, T, R>(self, handler: H) -> RouteNode
fn get<H, T, R>(self, handler: H) -> RouteNode
Alias for CreateRouteNode::at.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.