pub enum FieldType {
Show 16 variants
U32,
U64,
I32,
I64,
F64,
Bool,
String,
Uuid,
Timestamp,
Char(usize),
FixedArray(Box<FieldType>, usize),
StructType(String),
OptionalStructType(String),
Nullable(Box<FieldType>),
Relation(RelationType),
Component(ComponentReference),
}Variants§
U32
U64
I32
I64
F64
Bool
String
Uuid
Timestamp
Char(usize)
FixedArray(Box<FieldType>, usize)
StructType(String)
OptionalStructType(String)
Nullable(Box<FieldType>)
Nullable wrapper for primitive/scalar types (e.g. age: ?i32 or age: i32?)
Relation(RelationType)
Component(ComponentReference)
Implementations§
Source§impl FieldType
impl FieldType
pub fn to_rust_type(&self) -> String
pub fn is_auto_incrementable(&self) -> bool
pub fn is_auto_generatable(&self) -> bool
pub fn is_relation(&self) -> bool
Sourcepub fn is_fixed_size(&self) -> bool
pub fn is_fixed_size(&self) -> bool
Check if this type is fixed-size (Sprint 8)
Sourcepub fn struct_name(&self) -> Option<&str>
pub fn struct_name(&self) -> Option<&str>
Get struct name if this is a struct type (Sprint 8)
Sourcepub fn size_in_bytes(&self, schema: &Schema) -> usize
pub fn size_in_bytes(&self, schema: &Schema) -> usize
Get the size in bytes for fixed-size types (Sprint 8)
Sourcepub fn alignment(&self, schema: &Schema) -> usize
pub fn alignment(&self, schema: &Schema) -> usize
Get alignment requirement for this type (Sprint 8)
Sourcepub fn supports_range_queries(&self) -> bool
pub fn supports_range_queries(&self) -> bool
Determine if this type supports range queries (ordered)
Sourcepub fn default_index_type(&self) -> IndexType
pub fn default_index_type(&self) -> IndexType
Get the default index type for this field type
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 UnsafeUnpin 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