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>
Available on crate feature axum
only.
pub fn axum_route<S>(&self) -> ApiMethodRouter<S>
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>(
&self
) -> impl AxumOperationHandler<(), Html<&'static str>, ((),), S>
Available on crate feature axum
only.
pub fn axum_handler<S>( &self ) -> impl AxumOperationHandler<(), Html<&'static str>, ((),), S>
axum
only.Auto Trait Implementations§
impl Freeze for Redoc
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