pub struct FieldDef {
pub name: String,
pub field_type: FieldType,
}Expand description
Field definition with name and type
Each field in the schema has a name and declared type. For nested objects,
field names use dotted notation (e.g., "user.profile.name").
§Examples
ⓘ
use base_d::encoders::algorithms::schema::types::{FieldDef, FieldType};
// Simple field
let id_field = FieldDef::new("id", FieldType::U64);
// Nested field (flattened)
let name_field = FieldDef::new("user.profile.name", FieldType::String);
// Array field
let tags_field = FieldDef::new("tags", FieldType::Array(Box::new(FieldType::String)));Fields§
§name: String§field_type: FieldTypeImplementations§
Trait Implementations§
impl StructuralPartialEq for FieldDef
Auto Trait Implementations§
impl Freeze for FieldDef
impl RefUnwindSafe for FieldDef
impl Send for FieldDef
impl Sync for FieldDef
impl Unpin 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