pub struct OApiSchemaString { /* private fields */ }
Expand description
§An string in a schema
Implementations§
Source§impl OApiSchemaString
impl OApiSchemaString
Sourcepub fn min_length(&self) -> &Option<u64>
pub fn min_length(&self) -> &Option<u64>
The lower bound for the string length
Sourcepub fn max_length(&self) -> &Option<u64>
pub fn max_length(&self) -> &Option<u64>
The upper bound for the string length
Sourcepub fn format(&self) -> &Option<OApiStringFormat>
pub fn format(&self) -> &Option<OApiStringFormat>
The format to use for the string
Sourcepub fn nullable(&self) -> &Option<OperatorSelector<bool>>
pub fn nullable(&self) -> &Option<OperatorSelector<bool>>
Mark the string as nullable
Sourcepub fn read_only(&self) -> &Option<OperatorSelector<bool>>
pub fn read_only(&self) -> &Option<OperatorSelector<bool>>
Mark the string as read-only
Sourcepub fn write_only(&self) -> &Option<OperatorSelector<bool>>
pub fn write_only(&self) -> &Option<OperatorSelector<bool>>
Mark the string as write-only
Sourcepub fn example(&self) -> &Option<OperatorSelector<Value>>
pub fn example(&self) -> &Option<OperatorSelector<Value>>
An example for the string
Sourcepub fn deprecated(&self) -> &Option<OperatorSelector<bool>>
pub fn deprecated(&self) -> &Option<OperatorSelector<bool>>
Mark this string as deprecated
Sourcepub fn discriminator(
&self,
) -> &Option<OperatorSelector<OApiSchemaDiscriminator>>
pub fn discriminator( &self, ) -> &Option<OperatorSelector<OApiSchemaDiscriminator>>
A discriminator for this string
Sourcepub fn external_docs(
&self,
) -> &Option<OperatorSelector<OApiExternalDocumentation>>
pub fn external_docs( &self, ) -> &Option<OperatorSelector<OApiExternalDocumentation>>
External documentation for this string, if any
Trait Implementations§
Source§impl Clone for OApiSchemaString
impl Clone for OApiSchemaString
Source§fn clone(&self) -> OApiSchemaString
fn clone(&self) -> OApiSchemaString
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 OApiSchemaString
impl Debug for OApiSchemaString
Source§impl Default for OApiSchemaString
impl Default for OApiSchemaString
Source§fn default() -> OApiSchemaString
fn default() -> OApiSchemaString
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for OApiSchemaStringwhere
OApiSchemaString: Default,
impl<'de> Deserialize<'de> for OApiSchemaStringwhere
OApiSchemaString: 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 OApiSchemaString
impl OApiCheckTrait for OApiSchemaString
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 OApiSchemaString
impl OApiExtensionExtractor for OApiSchemaString
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 OApiSchemaString
impl PartialEq for OApiSchemaString
Source§impl Serialize for OApiSchemaString
impl Serialize for OApiSchemaString
Source§impl Sparsable for OApiSchemaString
impl Sparsable for OApiSchemaString
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 OApiSchemaString
Auto Trait Implementations§
impl Freeze for OApiSchemaString
impl RefUnwindSafe for OApiSchemaString
impl Send for OApiSchemaString
impl Sync for OApiSchemaString
impl Unpin for OApiSchemaString
impl UnwindSafe for OApiSchemaString
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