pub struct OpenApiRoute { /* private fields */ }Expand description
OpenAPI route metadata.
Implementations§
Source§impl OpenApiRoute
impl OpenApiRoute
Sourcepub fn try_get(path: impl Into<String>) -> Result<Self, RoutePathError>
pub fn try_get(path: impl Into<String>) -> Result<Self, RoutePathError>
Tries to create GET route metadata.
Sourcepub fn try_post(path: impl Into<String>) -> Result<Self, RoutePathError>
pub fn try_post(path: impl Into<String>) -> Result<Self, RoutePathError>
Tries to create POST route metadata.
Sourcepub fn try_put(path: impl Into<String>) -> Result<Self, RoutePathError>
pub fn try_put(path: impl Into<String>) -> Result<Self, RoutePathError>
Tries to create PUT route metadata.
Sourcepub fn try_patch(path: impl Into<String>) -> Result<Self, RoutePathError>
pub fn try_patch(path: impl Into<String>) -> Result<Self, RoutePathError>
Tries to create PATCH route metadata.
Sourcepub fn try_delete(path: impl Into<String>) -> Result<Self, RoutePathError>
pub fn try_delete(path: impl Into<String>) -> Result<Self, RoutePathError>
Tries to create DELETE route metadata.
Sourcepub fn response_status(self, status: StatusCode) -> Self
pub fn response_status(self, status: StatusCode) -> Self
Sets the successful response status for this operation.
Sourcepub fn request_schema<T>(self) -> Selfwhere
T: ToSchema,
pub fn request_schema<T>(self) -> Selfwhere
T: ToSchema,
Sets the JSON request body schema reference.
Sourcepub fn response_schema<T>(self) -> Selfwhere
T: ToSchema,
pub fn response_schema<T>(self) -> Selfwhere
T: ToSchema,
Sets the successful JSON response schema reference.
Trait Implementations§
Source§impl Clone for OpenApiRoute
impl Clone for OpenApiRoute
Source§fn clone(&self) -> OpenApiRoute
fn clone(&self) -> OpenApiRoute
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 moreAuto Trait Implementations§
impl Freeze for OpenApiRoute
impl RefUnwindSafe for OpenApiRoute
impl Send for OpenApiRoute
impl Sync for OpenApiRoute
impl Unpin for OpenApiRoute
impl UnsafeUnpin for OpenApiRoute
impl UnwindSafe for OpenApiRoute
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