pub struct EnumSchema { /* private fields */ }Expand description
Schema representing enumerated string variant constraints.
Implementations§
Source§impl EnumSchema
impl EnumSchema
Trait Implementations§
Source§impl Default for EnumSchema
impl Default for EnumSchema
Source§fn default() -> EnumSchema
fn default() -> EnumSchema
Returns the “default value” for a type. Read more
Source§impl SchemaValidator for EnumSchema
impl SchemaValidator for EnumSchema
Source§fn is_required(&self) -> bool
fn is_required(&self) -> bool
Returns
true if the field must be supplied and lacks a default value.Source§fn default_value(&self) -> Option<Value>
fn default_value(&self) -> Option<Value>
Yields the fallback
Value if this optional/default field is omitted.Source§fn schema_type(&self) -> &'static str
fn schema_type(&self) -> &'static str
Static string representing the readable type name.
Auto Trait Implementations§
impl Freeze for EnumSchema
impl RefUnwindSafe for EnumSchema
impl Send for EnumSchema
impl Sync for EnumSchema
impl Unpin for EnumSchema
impl UnsafeUnpin for EnumSchema
impl UnwindSafe for EnumSchema
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