pub struct Redoc { /* private fields */ }
Available on crate feature
redoc
only.Expand description
A wrapper to embed Redoc in your app.
Implementations§
source§impl Redoc
impl Redoc
sourcepub fn axum_route<S>(&self) -> ApiMethodRouter<S>where
S: Clone + Send + Sync + 'static,
Available on crate feature axum
only.
pub fn axum_route<S>(&self) -> ApiMethodRouter<S>where S: Clone + Send + Sync + 'static,
axum
only.Returns an ApiMethodRouter
to expose the Redoc UI.
Examples
ApiRouter::<()>::new()
.route("/docs", Redoc::new("/openapi.json").axum_route());
sourcepub fn axum_handler<S, B>(
&self
) -> impl AxumOperationHandler<(), Html<&'static str>, ((),), S, B>where
B: HttpBody + Send + 'static,
Available on crate feature axum
only.
pub fn axum_handler<S, B>( &self ) -> impl AxumOperationHandler<(), Html<&'static str>, ((),), S, B>where B: HttpBody + Send + 'static,
axum
only.Auto Trait Implementations§
impl RefUnwindSafe for Redoc
impl Send for Redoc
impl Sync for Redoc
impl Unpin for Redoc
impl UnwindSafe for Redoc
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