pub struct RouteEntry {
pub method: HttpMethod,
pub path: &'static str,
pub handler_type: &'static str,
pub rsp_type: &'static str,
pub summary: &'static str,
pub description: &'static str,
pub params: &'static [ParamMeta],
pub required_role: &'static str,
}Expand description
A route entry registered at compile time via #[endpoint] (or its shortcuts #[get]/#[post]/…).
Collected by the inventory crate and read at application startup.
Fields§
§method: HttpMethodHTTP method for this route.
path: &'static strRoute path pattern (e.g., “/users/{id}”).
handler_type: &'static strType name of the request handler. Used to dispatch to the correct handler at runtime.
rsp_type: &'static strOpenAPI response type name (e.g., “UserModel”, “Vec
summary: &'static strHuman-readable summary for OpenAPI docs (e.g., “Get user by ID”).
description: &'static strOptional long-form description from /// doc comments on the impl block.
params: &'static [ParamMeta]OpenAPI parameter metadata: path params, body params, etc.
required_role: &'static str“” = public, “authenticated” = any valid JWT, otherwise specific role name.
Implementations§
Trait Implementations§
Source§impl Clone for RouteEntry
impl Clone for RouteEntry
Source§fn clone(&self) -> RouteEntry
fn clone(&self) -> RouteEntry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Collect for RouteEntry
Auto Trait Implementations§
impl Freeze for RouteEntry
impl RefUnwindSafe for RouteEntry
impl Send for RouteEntry
impl Sync for RouteEntry
impl Unpin for RouteEntry
impl UnsafeUnpin for RouteEntry
impl UnwindSafe for RouteEntry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more