Struct utoipa_swagger_ui::Url
source · #[non_exhaustive]pub struct Url<'a> { /* private fields */ }
Expand description
Rust type for Swagger UI url configuration object.
Implementations§
source§impl<'a> Url<'a>
impl<'a> Url<'a>
sourcepub fn with_primary(name: &'a str, url: &'a str, primary: bool) -> Self
pub fn with_primary(name: &'a str, url: &'a str, primary: bool) -> Self
Create new Url
with primary flag.
Primary flag allows users to override the default behavior of the Swagger UI for selecting the primary doc to display. By default when there are multiple docs in Swagger UI the first one in the list will be the primary.
Name is shown in the select dropdown when there are multiple docs in Swagger UI.
Url is path which exposes the OpenAPI doc.
§Examples
Set “My Api” as primary.
let url = Url::with_primary("My Api", "/api-docs/openapi.json", true);
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Url<'a>
impl<'a> RefUnwindSafe for Url<'a>
impl<'a> Send for Url<'a>
impl<'a> Sync for Url<'a>
impl<'a> Unpin for Url<'a>
impl<'a> UnwindSafe for Url<'a>
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)