pub struct OApiSchemaObject { /* private fields */ }
Expand description
§An object in a schema
Implementations§
Source§impl OApiSchemaObject
impl OApiSchemaObject
Sourcepub fn properties(
&self,
) -> &Option<OperatorSelector<HashMap<String, OperatorSelector<OApiSchema>>>>
pub fn properties( &self, ) -> &Option<OperatorSelector<HashMap<String, OperatorSelector<OApiSchema>>>>
A map to the properties of this object
Sourcepub fn max_properties(&self) -> &Option<OperatorSelector<u64>>
pub fn max_properties(&self) -> &Option<OperatorSelector<u64>>
The upper limit of properties number
Sourcepub fn min_properties(&self) -> &Option<OperatorSelector<u64>>
pub fn min_properties(&self) -> &Option<OperatorSelector<u64>>
The lower limit of properties number
Sourcepub fn nullable(&self) -> &Option<OperatorSelector<bool>>
pub fn nullable(&self) -> &Option<OperatorSelector<bool>>
Mark this object as nullable
Sourcepub fn read_only(&self) -> &Option<OperatorSelector<bool>>
pub fn read_only(&self) -> &Option<OperatorSelector<bool>>
Mark this object as read-only
Sourcepub fn write_only(&self) -> &Option<OperatorSelector<bool>>
pub fn write_only(&self) -> &Option<OperatorSelector<bool>>
Mark this object as write-only
Sourcepub fn example(&self) -> &Option<OperatorSelector<Value>>
pub fn example(&self) -> &Option<OperatorSelector<Value>>
An example to illustrate this object
Sourcepub fn deprecated(&self) -> &Option<OperatorSelector<bool>>
pub fn deprecated(&self) -> &Option<OperatorSelector<bool>>
Mark this object as deprecated
Sourcepub fn discriminator(
&self,
) -> &Option<OperatorSelector<OApiSchemaDiscriminator>>
pub fn discriminator( &self, ) -> &Option<OperatorSelector<OApiSchemaDiscriminator>>
A discriminator for this object
Sourcepub fn external_docs(
&self,
) -> &Option<OperatorSelector<OApiExternalDocumentation>>
pub fn external_docs( &self, ) -> &Option<OperatorSelector<OApiExternalDocumentation>>
External documentation for this object, if any
Trait Implementations§
Source§impl Clone for OApiSchemaObject
impl Clone for OApiSchemaObject
Source§fn clone(&self) -> OApiSchemaObject
fn clone(&self) -> OApiSchemaObject
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 moreSource§impl Debug for OApiSchemaObject
impl Debug for OApiSchemaObject
Source§impl Default for OApiSchemaObject
impl Default for OApiSchemaObject
Source§fn default() -> OApiSchemaObject
fn default() -> OApiSchemaObject
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for OApiSchemaObjectwhere
OApiSchemaObject: Default,
impl<'de> Deserialize<'de> for OApiSchemaObjectwhere
OApiSchemaObject: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl OApiCheckTrait for OApiSchemaObject
impl OApiCheckTrait for OApiSchemaObject
Source§fn oapi_check(
&self,
root: &SparseRoot<OApiDocument>,
bread_crumb: &mut Vec<String>,
) -> Result<(), OApiError>
fn oapi_check( &self, root: &SparseRoot<OApiDocument>, bread_crumb: &mut Vec<String>, ) -> Result<(), OApiError>
Check the current object, if any checks are to be performed, then checks
its inner attributes
Source§fn oapi_check_inner(
&self,
root: &SparseRoot<OApiDocument>,
bread_crumb: &mut Vec<String>,
) -> Result<(), OApiError>
fn oapi_check_inner( &self, root: &SparseRoot<OApiDocument>, bread_crumb: &mut Vec<String>, ) -> Result<(), OApiError>
Check every inner attributes of the object
Source§impl OApiExtensionExtractor for OApiSchemaObject
impl OApiExtensionExtractor for OApiSchemaObject
Source§fn oapi_raw_ext(&self) -> &HashMap<String, Value>
fn oapi_raw_ext(&self) -> &HashMap<String, Value>
Return a map of value of the additionnal keys for that object
Source§fn oapi_extract_ext<S>(
&self,
root: &SparseRoot<OApiDocument>,
key: &str,
) -> Result<S, OApiError>
fn oapi_extract_ext<S>( &self, root: &SparseRoot<OApiDocument>, key: &str, ) -> Result<S, OApiError>
Try to deserialize to the type
S
the object at key
, providing the
root of the document for any SparsePointer dereferencingSource§impl PartialEq for OApiSchemaObject
impl PartialEq for OApiSchemaObject
Source§impl Serialize for OApiSchemaObject
impl Serialize for OApiSchemaObject
Source§impl Sparsable for OApiSchemaObject
impl Sparsable for OApiSchemaObject
Source§fn sparse_init(
&mut self,
state: &mut SparseState,
metadata: &SparseMetadata,
depth: u32,
) -> Result<(), SparseError>
fn sparse_init( &mut self, state: &mut SparseState, metadata: &SparseMetadata, depth: u32, ) -> Result<(), SparseError>
Initialize recusively a Sparsable pointer
Source§fn sparse_updt(
&mut self,
state: &mut SparseState,
metadata: &SparseMetadata,
depth: u32,
) -> Result<(), SparseError>
fn sparse_updt( &mut self, state: &mut SparseState, metadata: &SparseMetadata, depth: u32, ) -> Result<(), SparseError>
Update recusively a Sparsable pointer
Source§fn check_depth(&self, depth: u32) -> Result<(), SparseError>
fn check_depth(&self, depth: u32) -> Result<(), SparseError>
Check if the current depth isn’t too much.
This is the cyclic pointer protection mechanism
impl StructuralPartialEq for OApiSchemaObject
Auto Trait Implementations§
impl Freeze for OApiSchemaObject
impl RefUnwindSafe for OApiSchemaObject
impl Send for OApiSchemaObject
impl Sync for OApiSchemaObject
impl Unpin for OApiSchemaObject
impl UnwindSafe for OApiSchemaObject
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