pub struct HttpRouteDescriptor {
pub body_schema: Option<Value>,
/* private fields */
}Expand description
Public route descriptor snapshot for tooling integrations (e.g., OpenAPI generation).
Fields§
§body_schema: Option<Value>JSON Schema for the request body (auto-captured from post_typed etc.).
Implementations§
Source§impl HttpRouteDescriptor
impl HttpRouteDescriptor
pub fn new(method: Method, path_pattern: impl Into<String>) -> Self
pub fn method(&self) -> &Method
pub fn path_pattern(&self) -> &str
Sourcepub fn body_schema(&self) -> Option<&Value>
pub fn body_schema(&self) -> Option<&Value>
Returns the JSON Schema for the request body, if available.
Automatically populated when routes are registered via post_typed,
put_typed, or patch_typed (requires T: JsonSchema).
Trait Implementations§
Source§impl Clone for HttpRouteDescriptor
impl Clone for HttpRouteDescriptor
Source§fn clone(&self) -> HttpRouteDescriptor
fn clone(&self) -> HttpRouteDescriptor
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for HttpRouteDescriptor
impl RefUnwindSafe for HttpRouteDescriptor
impl Send for HttpRouteDescriptor
impl Sync for HttpRouteDescriptor
impl Unpin for HttpRouteDescriptor
impl UnsafeUnpin for HttpRouteDescriptor
impl UnwindSafe for HttpRouteDescriptor
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