pub struct Components { /* private fields */ }
Expand description
Storage for reusable components (schemas/parameters/responses/…).
Implementations§
Source§impl Components
impl Components
Sourcepub fn schema_for<T: JsonSchema>(&mut self) -> SchemaObject
pub fn schema_for<T: JsonSchema>(&mut self) -> SchemaObject
Get schema for type.
Sourcepub fn add_security_scheme<N>(&mut self, name: N, sec: SecurityScheme)
pub fn add_security_scheme<N>(&mut self, name: N, sec: SecurityScheme)
Add security scheme to components.
Trait Implementations§
Source§impl Clone for Components
impl Clone for Components
Source§fn clone(&self) -> Components
fn clone(&self) -> Components
Returns a duplicate of the value. Read more
1.0.0 · Source§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 Components
impl !RefUnwindSafe for Components
impl !Send for Components
impl !Sync for Components
impl Unpin for Components
impl !UnwindSafe for Components
Blanket Implementations§
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