pub struct OpenApiDocument { /* private fields */ }Expand description
A generated, serializable OpenAPI document.
Implementations§
Source§impl OpenApiDocument
impl OpenApiDocument
Sourcepub fn from_application(
application: &CompiledHttpApplication,
config: &OpenApiConfig,
) -> Result<Self, OpenApiError>
pub fn from_application( application: &CompiledHttpApplication, config: &OpenApiConfig, ) -> Result<Self, OpenApiError>
Discovers compiled framework routes and generates an OpenAPI 3.1 document.
§Errors
Returns OpenApiError for invalid endpoints or duplicate explicit operation IDs.
Sourcepub fn into_value(self) -> Value
pub fn into_value(self) -> Value
Consumes the document and returns its JSON value.
Trait Implementations§
Source§impl Clone for OpenApiDocument
impl Clone for OpenApiDocument
Source§fn clone(&self) -> OpenApiDocument
fn clone(&self) -> OpenApiDocument
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 OpenApiDocument
impl RefUnwindSafe for OpenApiDocument
impl Send for OpenApiDocument
impl Sync for OpenApiDocument
impl Unpin for OpenApiDocument
impl UnsafeUnpin for OpenApiDocument
impl UnwindSafe for OpenApiDocument
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