[−][src]Struct opg::models::Components
Components Object
Fields
schemas: BTreeMap<String, Model>
An object to hold reusable Schema Objects
security_schemes: BTreeMap<String, SecurityScheme>
An object to hold reusable Security Scheme Objects
Implementations
impl Components
[src]
pub fn new() -> Self
[src]
pub fn contains_model(&self, name: &str) -> bool
[src]
Check name occurrence in schemas
pub fn mention_schema<M: ?Sized>(
&mut self,
inline: bool,
params: &ContextParams
) -> ModelReference where
M: OpgModel,
[src]
&mut self,
inline: bool,
params: &ContextParams
) -> ModelReference where
M: OpgModel,
Insert model into schema and return it's reference
pub fn mention_security_scheme<T>(
&mut self,
name: String,
security_scheme: &T
) -> String where
T: Clone,
SecurityScheme: From<T>,
[src]
&mut self,
name: String,
security_scheme: &T
) -> String where
T: Clone,
SecurityScheme: From<T>,
Insert security scheme and return it's name
pub fn verify_schemas(&self) -> Result<(), String>
[src]
Verify schemas references
pub fn add_model<N>(&mut self, name: N, model: Model) where
N: ToString,
[src]
N: ToString,
Manually insert model with specified name
Trait Implementations
impl Clone for Components
[src]
fn clone(&self) -> Components
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for Components
[src]
impl Default for Components
[src]
fn default() -> Components
[src]
impl Serialize for Components
[src]
Auto Trait Implementations
impl RefUnwindSafe for Components
impl Send for Components
impl Sync for Components
impl Unpin for Components
impl UnwindSafe for Components
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,