pub struct OApiSchemaNumeric { /* private fields */ }Expand description
§A numeric object in a schema
Implementations§
Source§impl OApiSchemaNumeric
 
impl OApiSchemaNumeric
Sourcepub fn multiple_of(&self) -> &Option<Option<u64>>
 
pub fn multiple_of(&self) -> &Option<Option<u64>>
Define this number should be a multiple of
Sourcepub fn maximum(&self) -> &Option<OApiNumericMaximum>
 
pub fn maximum(&self) -> &Option<OApiNumericMaximum>
Upper bound for this number
Sourcepub fn minimum(&self) -> &Option<OApiNumericMinimum>
 
pub fn minimum(&self) -> &Option<OApiNumericMinimum>
Lower bound for this number
Sourcepub fn format(&self) -> &Option<OApiNumericFormat>
 
pub fn format(&self) -> &Option<OApiNumericFormat>
Format to use for this number
Sourcepub fn nullable(&self) -> &Option<OperatorSelector<bool>>
 
pub fn nullable(&self) -> &Option<OperatorSelector<bool>>
Mark this number as nullable
Sourcepub fn read_only(&self) -> &Option<OperatorSelector<bool>>
 
pub fn read_only(&self) -> &Option<OperatorSelector<bool>>
Mark this number as read_only
Sourcepub fn write_only(&self) -> &Option<OperatorSelector<bool>>
 
pub fn write_only(&self) -> &Option<OperatorSelector<bool>>
Mark this number as write_only
Sourcepub fn example(&self) -> &Option<OperatorSelector<Value>>
 
pub fn example(&self) -> &Option<OperatorSelector<Value>>
An example for this number
Sourcepub fn deprecated(&self) -> &Option<OperatorSelector<bool>>
 
pub fn deprecated(&self) -> &Option<OperatorSelector<bool>>
Mark this number as deprecated
Sourcepub fn discriminator(
    &self,
) -> &Option<OperatorSelector<OApiSchemaDiscriminator>>
 
pub fn discriminator( &self, ) -> &Option<OperatorSelector<OApiSchemaDiscriminator>>
A discriminator for this number
Sourcepub fn external_docs(
    &self,
) -> &Option<OperatorSelector<OApiExternalDocumentation>>
 
pub fn external_docs( &self, ) -> &Option<OperatorSelector<OApiExternalDocumentation>>
An external documentation for this number, if any
Trait Implementations§
Source§impl Clone for OApiSchemaNumeric
 
impl Clone for OApiSchemaNumeric
Source§fn clone(&self) -> OApiSchemaNumeric
 
fn clone(&self) -> OApiSchemaNumeric
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 OApiSchemaNumeric
 
impl Debug for OApiSchemaNumeric
Source§impl Default for OApiSchemaNumeric
 
impl Default for OApiSchemaNumeric
Source§fn default() -> OApiSchemaNumeric
 
fn default() -> OApiSchemaNumeric
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for OApiSchemaNumericwhere
    OApiSchemaNumeric: Default,
 
impl<'de> Deserialize<'de> for OApiSchemaNumericwhere
    OApiSchemaNumeric: 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 OApiSchemaNumeric
 
impl OApiCheckTrait for OApiSchemaNumeric
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 OApiSchemaNumeric
 
impl OApiExtensionExtractor for OApiSchemaNumeric
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 OApiSchemaNumeric
 
impl PartialEq for OApiSchemaNumeric
Source§impl Serialize for OApiSchemaNumeric
 
impl Serialize for OApiSchemaNumeric
Source§impl Sparsable for OApiSchemaNumeric
 
impl Sparsable for OApiSchemaNumeric
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 OApiSchemaNumeric
Auto Trait Implementations§
impl Freeze for OApiSchemaNumeric
impl RefUnwindSafe for OApiSchemaNumeric
impl Send for OApiSchemaNumeric
impl Sync for OApiSchemaNumeric
impl Unpin for OApiSchemaNumeric
impl UnwindSafe for OApiSchemaNumeric
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