pub struct OpenApiDoc {
pub title: String,
pub version: String,
pub routes: Vec<OpenApiRoute>,
}Fields§
§title: String§version: String§routes: Vec<OpenApiRoute>Implementations§
Source§impl OpenApiDoc
impl OpenApiDoc
pub fn new(title: impl Into<String>, version: impl Into<String>) -> Self
pub fn add_route( self, method: impl Into<String>, path: impl Into<String>, ) -> Self
pub fn from_routes( title: impl Into<String>, version: impl Into<String>, routes: Vec<RouteDocumentation>, ) -> Self
pub fn to_openapi_json(&self) -> Value
Trait Implementations§
Source§impl Clone for OpenApiDoc
impl Clone for OpenApiDoc
Source§fn clone(&self) -> OpenApiDoc
fn clone(&self) -> OpenApiDoc
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 moreSource§impl Debug for OpenApiDoc
impl Debug for OpenApiDoc
Auto Trait Implementations§
impl Freeze for OpenApiDoc
impl RefUnwindSafe for OpenApiDoc
impl Send for OpenApiDoc
impl Sync for OpenApiDoc
impl Unpin for OpenApiDoc
impl UnsafeUnpin for OpenApiDoc
impl UnwindSafe for OpenApiDoc
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