pub struct FieldDefinition { /* private fields */ }Expand description
Defines the validated schema and metadata for a single field in a Form.
A FieldDefinition does not hold the data itself; rather, it describes
what the data should look like.
Implementations§
Source§impl FieldDefinition
impl FieldDefinition
Sourcepub fn field_type(&self) -> &FieldType
pub fn field_type(&self) -> &FieldType
Getter method to obtain Field Type
Sourcepub fn is_required(&self) -> bool
pub fn is_required(&self) -> bool
Getter method to return whether a field is required
Sourcepub fn description(&self) -> Option<&str>
pub fn description(&self) -> Option<&str>
Getter method to obtain Field Description
Trait Implementations§
Source§impl Clone for FieldDefinition
impl Clone for FieldDefinition
Source§fn clone(&self) -> FieldDefinition
fn clone(&self) -> FieldDefinition
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 FieldDefinition
impl Debug for FieldDefinition
Source§impl<'de> Deserialize<'de> for FieldDefinition
impl<'de> Deserialize<'de> for FieldDefinition
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 Serialize for FieldDefinition
impl Serialize for FieldDefinition
Source§impl TryFrom<FieldBuilder> for FieldDefinition
impl TryFrom<FieldBuilder> for FieldDefinition
Source§type Error = ValidationErrors
type Error = ValidationErrors
The type returned in the event of a conversion error.
Source§impl Validate for FieldDefinition
impl Validate for FieldDefinition
Source§impl<'v_a> ValidateArgs<'v_a> for FieldDefinition
impl<'v_a> ValidateArgs<'v_a> for FieldDefinition
Auto Trait Implementations§
impl Freeze for FieldDefinition
impl RefUnwindSafe for FieldDefinition
impl Send for FieldDefinition
impl Sync for FieldDefinition
impl Unpin for FieldDefinition
impl UnwindSafe for FieldDefinition
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