pub struct SwaggerUi {
pub path: &'static str,
pub config: Config,
/* private fields */
}
Expand description
Set of endpoints serving a Swagger UI and the actual openapi files
Fields§
§path: &'static str
The path under which to serve the ui
config: Config
The config to use
Note: the urls
field will be extended
by the SwaggapiPage
s you added through SwaggerUi::page
.
Implementations§
Source§impl SwaggerUi
impl SwaggerUi
Sourcepub fn without_everything() -> Self
pub fn without_everything() -> Self
Returns SwaggerUi::default
but without including the PageOfEverything
Sourcepub fn with_path(path: &'static str) -> Self
pub fn with_path(path: &'static str) -> Self
Returns SwaggerUi::default
with a given path
Sourcepub fn page(self, display_name: &'static str, page: impl SwaggapiPage) -> Self
pub fn page(self, display_name: &'static str, page: impl SwaggapiPage) -> Self
Adds a SwaggapiPage
to the ui
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SwaggerUi
impl RefUnwindSafe for SwaggerUi
impl Send for SwaggerUi
impl Sync for SwaggerUi
impl Unpin for SwaggerUi
impl UnwindSafe for SwaggerUi
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