RouteHandler

Trait RouteHandler 

Source
pub trait RouteHandler<T>: Handler<T> {
    const PATH: &'static str;
    const METHOD: &'static str;
}
Expand description

Trait for handlers with route metadata (generated by #[rustapi::get], etc.)

This trait provides the path and method information for a handler, allowing .mount(handler) to automatically register the route.

Required Associated Constants§

Source

const PATH: &'static str

The path pattern for this route (e.g., “/users/{id}”)

Source

const METHOD: &'static str

The HTTP method for this route (e.g., “GET”)

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.

Implementors§