Struct rocket_okapi::rapidoc::SlotsConfig
source · [−]pub struct SlotsConfig {
pub default: Vec<String>,
pub logo: Option<String>,
pub header: Option<String>,
pub footer: Option<String>,
pub nav_logo: Option<String>,
pub overview: Option<String>,
pub servers: Option<String>,
pub auth: Option<String>,
pub tags: HashMap<String, String>,
pub endpoints: HashMap<String, String>,
}
Expand description
Config used to configure the slots. Each slot usually corresponds with one section. Each field can include any HTML tags.
For an example of all the slots locations see: https://mrin9.github.io/RapiDoc/examples/slots.html
Fields
default: Vec<String>
Any content here will be shown immediately under the header and above the info section.
logo: Option<String>
An image used as the page logo. This can contain:
- An URL to an image (eg:
"https://example.com/example.png"
) - An encoded image (eg:
"data:image/svg+xml;base64,...=="
)
header: Option<String>
The contents appear at the header after the spec-url input.
The contents appear at the bottom of the spec.
The contents appear at side navigation bar (only available in read-mode).
overview: Option<String>
The contents appear at overview section.
servers: Option<String>
The contents appear at server section.
auth: Option<String>
The contents appear at authentication section.
Each tag is identified by a name, this slot can be used to insert HTML content under various tags.
The first value (key) should be the name of the tag.
This will be prefixed with tag--{tag-name}
when generated.
The second value (value) will be the HTML inserted.
endpoints: HashMap<String, String>
Each path is identified by an id. The key of which is in the format of {method}-{path}
.
and certain invalid characters such as {
, }
, #
, space is replaced by hyphen (-).
Use this slot to insert HTML content into a specific tag.
Trait Implementations
sourceimpl Clone for SlotsConfig
impl Clone for SlotsConfig
sourcefn clone(&self) -> SlotsConfig
fn clone(&self) -> SlotsConfig
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SlotsConfig
impl Debug for SlotsConfig
sourceimpl Default for SlotsConfig
impl Default for SlotsConfig
sourcefn default() -> SlotsConfig
fn default() -> SlotsConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for SlotsConfig
impl Send for SlotsConfig
impl Sync for SlotsConfig
impl Unpin for SlotsConfig
impl UnwindSafe for SlotsConfig
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>
impl<T> IntoCollection<T> for T
impl<T> IntoCollection<T> for T
fn into_collection<A>(self) -> SmallVec<A> where
A: Array<Item = T>,
fn into_collection<A>(self) -> SmallVec<A> where
A: Array<Item = T>,
Converts self
into a collection.
fn mapped<U, F, A>(self, f: F) -> SmallVec<A> where
F: FnMut(T) -> U,
A: Array<Item = U>,
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