Skip to main content

MountDocsExt

Trait MountDocsExt 

Source
pub trait MountDocsExt<S>
where S: Clone + Send + Sync + 'static,
{ // Required method fn mount_docs(self, api_doc: ApiDoc, opts: MountOpts) -> Self; }
Expand description

Extension trait providing mount_docs as a fluent method on axum::Router. Equivalent to the free function mount_docs.

Required Methods§

Source

fn mount_docs(self, api_doc: ApiDoc, opts: MountOpts) -> Self

Mount the OpenAPI JSON endpoint and (optionally) the documentation UI on self.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<S> MountDocsExt<S> for Router<S>
where S: Clone + Send + Sync + 'static,

Source§

fn mount_docs(self, api_doc: ApiDoc, opts: MountOpts) -> Self

Implementors§