pub struct EndpointInfo {
pub method: String,
pub path: String,
pub summary: Option<String>,
pub description: Option<String>,
pub tags: Vec<String>,
pub deprecated: bool,
pub security: Vec<String>,
pub operation_id: Option<String>,
}Expand description
An OpenAPI endpoint for display.
Fields§
§method: StringHTTP method.
path: StringPath pattern.
summary: Option<String>Operation summary.
description: Option<String>Operation description.
Tags for grouping.
deprecated: boolWhether deprecated.
security: Vec<String>Security requirements.
operation_id: Option<String>Operation ID.
Implementations§
Source§impl EndpointInfo
impl EndpointInfo
Sourcepub fn new(method: impl Into<String>, path: impl Into<String>) -> Self
pub fn new(method: impl Into<String>, path: impl Into<String>) -> Self
Create a new endpoint info.
Sourcepub fn description(self, description: impl Into<String>) -> Self
pub fn description(self, description: impl Into<String>) -> Self
Set the description.
Sourcepub fn deprecated(self, deprecated: bool) -> Self
pub fn deprecated(self, deprecated: bool) -> Self
Mark as deprecated.
Sourcepub fn operation_id(self, id: impl Into<String>) -> Self
pub fn operation_id(self, id: impl Into<String>) -> Self
Set the operation ID.
Trait Implementations§
Source§impl Clone for EndpointInfo
impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
fn clone(&self) -> EndpointInfo
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 EndpointInfo
impl RefUnwindSafe for EndpointInfo
impl Send for EndpointInfo
impl Sync for EndpointInfo
impl Unpin for EndpointInfo
impl UnsafeUnpin for EndpointInfo
impl UnwindSafe for EndpointInfo
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