pub struct OpenApiConfig { /* private fields */ }Expand description
Configuration for OpenApiPlugin.
Implementations§
Source§impl OpenApiConfig
Fluent builder helpers for OpenApiConfig.
impl OpenApiConfig
Fluent builder helpers for OpenApiConfig.
Sourcepub fn from_spec(spec: OpenApiSpec) -> Self
pub fn from_spec(spec: OpenApiSpec) -> Self
Constructs an OpenApiConfig from an OpenApiSpec.
§Arguments
OpenApiSpec- Specification document.
§Returns
Self- New configuration with default/openapi.jsonand/docsendpoints.
Sourcepub fn with_spec_path<S>(self, path: S) -> Self
pub fn with_spec_path<S>(self, path: S) -> Self
Source§impl OpenApiConfig
impl OpenApiConfig
pub fn get_spec(&self) -> &OpenApiSpec
pub fn get_mut_spec(&mut self) -> &mut OpenApiSpec
pub fn set_spec(&mut self, val: OpenApiSpec) -> &mut Self
pub fn get_spec_path(&self) -> &String
pub fn get_mut_spec_path(&mut self) -> &mut String
pub fn set_spec_path(&mut self, val: String) -> &mut Self
pub fn get_docs_path(&self) -> String
pub fn try_get_docs_path(&self) -> &Option<String>
pub fn get_mut_docs_path(&mut self) -> &mut Option<String>
pub fn set_docs_path(&mut self, val: Option<String>) -> &mut Self
pub fn get_cache_control(&self) -> &String
pub fn get_mut_cache_control(&mut self) -> &mut String
pub fn set_cache_control(&mut self, val: String) -> &mut Self
Trait Implementations§
Source§impl Clone for OpenApiConfig
impl Clone for OpenApiConfig
Source§impl Debug for OpenApiConfig
impl Debug for OpenApiConfig
Source§impl Default for OpenApiConfig
Default construction for OpenApiConfig.
impl Default for OpenApiConfig
Default construction for OpenApiConfig.
Source§fn default() -> Self
fn default() -> Self
Builds a default OpenApiConfig serving /openapi.json and /docs.
§Returns
Self- Default configuration.
impl Eq for OpenApiConfig
Source§impl PartialEq for OpenApiConfig
impl PartialEq for OpenApiConfig
impl StructuralPartialEq for OpenApiConfig
Auto Trait Implementations§
impl Forget for OpenApiConfig
impl Freeze for OpenApiConfigwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<OpenApiServer>: Freeze,
*const LeafNode<String, BTreeMap<String, OpenApiOperation>> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, BTreeMap<String, OpenApiOperation>)>>: Freeze,
impl Move for OpenApiConfig
impl RefUnwindSafe for OpenApiConfig
impl Send for OpenApiConfig
impl Sync for OpenApiConfig
impl Unpin for OpenApiConfig
impl UnsafeUnpin for OpenApiConfigwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<OpenApiServer>: UnsafeUnpin,
*const LeafNode<String, BTreeMap<String, OpenApiOperation>> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, BTreeMap<String, OpenApiOperation>)>>: UnsafeUnpin,
impl UnwindSafe for OpenApiConfig
Blanket Implementations§
impl<T> AnySend for T
impl<T> AnySendClone for T
impl<T> AnySendSync for T
impl<T> AnySendSyncClone for T
impl<T> AnySync for T
impl<T> AnySyncClone for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.