pub enum DefaultType {
Required,
Optional,
Default(SerializationModel),
}Expand description
Describes whether a field is required or optional
Variants§
Required
The field must be supplied
Optional
The field can be supplied, the type of the field will be Option<data_type>, if not supplied it defaults to None
Default(SerializationModel)
The field can be supplied, if not supplied it defaults to the default value
Trait Implementations§
Source§impl Clone for DefaultType
impl Clone for DefaultType
Source§fn clone(&self) -> DefaultType
fn clone(&self) -> DefaultType
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 DefaultType
impl Debug for DefaultType
Source§impl<'de> Deserialize<'de> for DefaultType
impl<'de> Deserialize<'de> for DefaultType
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 PartialEq for DefaultType
impl PartialEq for DefaultType
Source§impl Serialize for DefaultType
impl Serialize for DefaultType
impl StructuralPartialEq for DefaultType
Auto Trait Implementations§
impl Freeze for DefaultType
impl RefUnwindSafe for DefaultType
impl Send for DefaultType
impl Sync for DefaultType
impl Unpin for DefaultType
impl UnsafeUnpin for DefaultType
impl UnwindSafe for DefaultType
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