Struct rocket4::StaticRouteInfo
source · pub struct StaticRouteInfo {
pub name: &'static str,
pub method: Method,
pub path: &'static str,
pub format: Option<MediaType>,
pub handler: fn(_: &'r Request<'_>, _: Data) -> Outcome<Response<'r>, Status, Data>,
pub rank: Option<isize>,
}Expand description
Information generated by the route attribute during codegen.
Fields
name: &'static strThe route’s name, i.e, the name of the function.
method: MethodThe route’s method.
path: &'static strThe route’s path, without the base mount point.
format: Option<MediaType>The route’s format, if any.
handler: fn(_: &'r Request<'_>, _: Data) -> Outcome<Response<'r>, Status, Data>The route’s handler, i.e, the annotated function.
rank: Option<isize>The route’s rank, if any.
Auto Trait Implementations
impl RefUnwindSafe for StaticRouteInfo
impl Send for StaticRouteInfo
impl Sync for StaticRouteInfo
impl Unpin for StaticRouteInfo
impl UnwindSafe for StaticRouteInfo
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> IntoCollection<T> for T
impl<T> IntoCollection<T> for T
fn into_collection<A>(self) -> SmallVec<A>where
A: Array<Item = T>,
fn into_collection<A>(self) -> SmallVec<A>where
A: Array<Item = T>,
Converts
self into a collection.