pub struct OpenApiBuilder { /* private fields */ }Expand description
OpenAPI Documentation Builder
Implementations§
Source§impl OpenApiBuilder
impl OpenApiBuilder
pub fn new(title: impl Into<String>, version: impl Into<String>) -> Self
pub fn description(self, desc: impl Into<String>) -> Self
pub fn server(self, url: impl Into<String>, description: Option<String>) -> Self
pub fn path(self, path: impl Into<String>, item: PathItem) -> Self
pub fn build(self) -> OpenApiSpec
pub fn to_json(&self) -> Result<String, Error>
Auto Trait Implementations§
impl Freeze for OpenApiBuilder
impl RefUnwindSafe for OpenApiBuilder
impl Send for OpenApiBuilder
impl Sync for OpenApiBuilder
impl Unpin for OpenApiBuilder
impl UnwindSafe for OpenApiBuilder
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