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.

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.

footer: Option<String>

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.

tags: HashMap<String, String>

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Converts self into a collection.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more