pub struct FieldSchema {
pub field_type: String,
pub enum_values: Vec<Value>,
pub min: Option<f64>,
pub max: Option<f64>,
pub default: Option<Value>,
pub default_expr: Option<String>,
}Expand description
Schema for a single field.
Fields§
§field_type: String§enum_values: Vec<Value>§min: Option<f64>§max: Option<f64>§default: Option<Value>Static default applied when a record is created without an explicit
value for this field. Validated against field_type and enum_values
at schema load time, so bad defaults fail loudly rather than silently
landing in user files.
default_expr: Option<String>Dynamic default — one of the closed enum values today, now,
epoch. Resolved at the moment a record is created, not at schema
load. Mutually exclusive with default.
Trait Implementations§
Source§impl Clone for FieldSchema
impl Clone for FieldSchema
Source§fn clone(&self) -> FieldSchema
fn clone(&self) -> FieldSchema
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 FieldSchema
impl Debug for FieldSchema
Source§impl<'de> Deserialize<'de> for FieldSchema
impl<'de> Deserialize<'de> for FieldSchema
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 FieldSchema
impl RefUnwindSafe for FieldSchema
impl Send for FieldSchema
impl Sync for FieldSchema
impl Unpin for FieldSchema
impl UnsafeUnpin for FieldSchema
impl UnwindSafe for FieldSchema
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