pub struct RouteJson {
pub method: String,
pub path: String,
pub handler: String,
pub name: Option<String>,
pub middleware: Vec<String>,
}Expand description
Single route entry in RoutesJson.
Fields§
§method: StringUppercase HTTP verb: "GET" | "POST" | "PUT" | "PATCH" | "DELETE".
path: StringPath with {param} placeholders, e.g. "/users/{id}".
handler: StringFully-qualified handler: "controllers::user::show".
name: Option<String>Optional named route, e.g. "users.show".
middleware: Vec<String>Middleware names attached to this route. Always present (may be empty in Phase 124 — middleware parsing is future work, but the field is part of the stable contract and never omitted).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RouteJson
impl<'de> Deserialize<'de> for RouteJson
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for RouteJson
Auto Trait Implementations§
impl Freeze for RouteJson
impl RefUnwindSafe for RouteJson
impl Send for RouteJson
impl Sync for RouteJson
impl Unpin for RouteJson
impl UnsafeUnpin for RouteJson
impl UnwindSafe for RouteJson
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more