pub enum FieldType {
U64,
I64,
F64,
String,
Bool,
Null,
Array(Box<FieldType>),
Any,
}Expand description
Field types supported in schema encoding
Each field in the schema has a declared type. These types map to JSON types and are encoded with 4-bit type tags in the binary format.
§Type Mapping
U64- JSON numbers (positive integers)I64- JSON numbers (negative integers)F64- JSON numbers (floats)String- JSON stringsBool- JSON booleansNull- JSON nullArray(T)- JSON arrays (homogeneous element type)Any- Mixed-type values (reserved for future use)
Variants§
Implementations§
Source§impl FieldType
impl FieldType
Sourcepub fn display_name(&self) -> String
pub fn display_name(&self) -> String
Get user-friendly display name for error messages
Sourcepub fn from_type_tag(
tag: u8,
element_type: Option<Box<FieldType>>,
) -> Result<Self, SchemaError>
pub fn from_type_tag( tag: u8, element_type: Option<Box<FieldType>>, ) -> Result<Self, SchemaError>
Construct a FieldType from a 4-bit type tag
Trait Implementations§
impl StructuralPartialEq for FieldType
Auto Trait Implementations§
impl Freeze for FieldType
impl RefUnwindSafe for FieldType
impl Send for FieldType
impl Sync for FieldType
impl Unpin for FieldType
impl UnwindSafe for FieldType
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