pub struct DocsConfig {
pub path: String,
pub title: String,
pub version: String,
pub description: Option<String>,
}Expand description
Documentation configuration
Configures how API documentation should be served.
Fields§
§path: StringPath where documentation will be served (e.g., “/docs”)
title: StringAPI title
version: StringAPI version
description: Option<String>Optional API description
Implementations§
Source§impl DocsConfig
impl DocsConfig
Sourcepub fn new(
path: impl Into<String>,
title: impl Into<String>,
version: impl Into<String>,
) -> DocsConfig
pub fn new( path: impl Into<String>, title: impl Into<String>, version: impl Into<String>, ) -> DocsConfig
Create a new documentation configuration
Sourcepub fn with_description(self, description: impl Into<String>) -> DocsConfig
pub fn with_description(self, description: impl Into<String>) -> DocsConfig
Set the API description
Sourcepub fn openapi_path(&self) -> String
pub fn openapi_path(&self) -> String
Get the OpenAPI spec path
Trait Implementations§
Source§impl Clone for DocsConfig
impl Clone for DocsConfig
Source§fn clone(&self) -> DocsConfig
fn clone(&self) -> DocsConfig
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DocsConfig
impl RefUnwindSafe for DocsConfig
impl Send for DocsConfig
impl Sync for DocsConfig
impl Unpin for DocsConfig
impl UnwindSafe for DocsConfig
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)