pub struct Scalar { /* private fields */ }Available on crate feature
scalar only.Expand description
A wrapper to embed Scalar in your app.
Implementations§
Source§impl Scalar
impl Scalar
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 Scalar API References.
§Examples
ApiRouter::<()>::new()
.route("/docs", Scalar::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 Scalar
impl RefUnwindSafe for Scalar
impl Send for Scalar
impl Sync for Scalar
impl Unpin for Scalar
impl UnwindSafe for Scalar
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