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
sourceimpl<'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 behaviour 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-doc/openapi.json", true);
Trait Implementations
Auto Trait Implementations
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more