Struct rocket_okapi::rapidoc::RapiDocConfig
source · [−]pub struct RapiDocConfig {
pub title: Option<String>,
pub general: GeneralConfig,
pub ui: UiConfig,
pub nav: NavConfig,
pub layout: LayoutConfig,
pub hide_show: HideShowConfig,
pub api: ApiConfig,
pub slots: SlotsConfig,
pub custom_html: Option<String>,
pub custom_template_tags: HashMap<String, String>,
}
Expand description
A struct containing information about where and how the openapi.json
files are served.
Fields
title: Option<String>
Webpage title. An optional title for the webpage.
If set to None
we will create a default title.
general: GeneralConfig
General settings. The spec_urls
property must be specified by the user.
ui: UiConfig
Settings related to the ui and theming.
Settings related to the nav bar.
layout: LayoutConfig
Settings relatd to the layout of the displayed docs.
hide_show: HideShowConfig
Settings used to control what features should or should not be displayed.
api: ApiConfig
Settings used to configure access to the api.
slots: SlotsConfig
Settings to configure the Rapi Doc “slots”.
custom_html: Option<String>
Provide a custom HTML file content. The templated values will still be replaced. So other settings can still be used. Use ../rapidoc/index.html as an example.
A list of custom tags that can be used in combination with custom_html
.
This allows for additional custom template tags that will be replaced in the html.
The key should be the name of the tag without the brackets, {{key}}
.
The value will be the text the value will be replaced with.
The custom tags are replaced before all other tags, this allows for more flexibility
but also means that you can break things. If you want to be sure to not overlap with
existing tags, prefix your custom tags with _
, c_
or C_
.
We will never use these prefixes in the provided tags.
Trait Implementations
sourceimpl Clone for RapiDocConfig
impl Clone for RapiDocConfig
sourcefn clone(&self) -> RapiDocConfig
fn clone(&self) -> RapiDocConfig
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 RapiDocConfig
impl Debug for RapiDocConfig
sourceimpl Default for RapiDocConfig
impl Default for RapiDocConfig
sourcefn default() -> RapiDocConfig
fn default() -> RapiDocConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for RapiDocConfig
impl Send for RapiDocConfig
impl Sync for RapiDocConfig
impl Unpin for RapiDocConfig
impl UnwindSafe for RapiDocConfig
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