pub struct FieldDef {
pub name: String,
pub ty: FieldType,
pub required: bool,
pub description: Option<String>,
}Expand description
A single field definition parsed from schema.yaml.
§Fields
name: the field name as it appears in stored JSON rows.ty: the expected JSON type.required: iftrue, the field must be present and non-null in every row.description: optional human-readable description of this field.
Fields§
§name: StringField name (arbitrary string — never hard-coded in application logic).
ty: FieldTypeExpected JSON type for this field.
required: boolWhether the field must be present in every row.
description: Option<String>Optional human-readable description of this field.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for FieldDef
impl<'de> Deserialize<'de> for FieldDef
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
Auto Trait Implementations§
impl Freeze for FieldDef
impl RefUnwindSafe for FieldDef
impl Send for FieldDef
impl Sync for FieldDef
impl Unpin for FieldDef
impl UnsafeUnpin for FieldDef
impl UnwindSafe for FieldDef
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