pub struct RecordDefinition {
pub kind: RecordKind,
pub name: &'static str,
pub is_pk_idx: bool,
pub support_range_scan: bool,
pub data_size: u32,
pub version: u16,
pub pk_encode: Option<PkEncodeFn>,
pub fields: &'static [FieldDefinition],
pub reserved_fields: &'static [FieldDefinition],
pub pk_fields: &'static [&'static str],
}Expand description
Static definition for one record type.
Fields§
§kind: RecordKindStable record kind.
name: &'static strRust/source-level record name.
is_pk_idx: boolWhether a primary-key index is defined.
support_range_scan: boolWhether range scans are expected for this record’s primary-key index.
data_size: u32Record data bytes excluding host-owned metadata.
version: u16Schema version encoded as a compact u16.
pk_encode: Option<PkEncodeFn>Optional generated primary-key encoder.
fields: &'static [FieldDefinition]Active schema fields.
reserved_fields: &'static [FieldDefinition]Reserved fields retained for layout compatibility.
pk_fields: &'static [&'static str]Field names used to build the primary key.
Implementations§
Source§impl RecordDefinition
impl RecordDefinition
Sourcepub fn field_by_name(&self, name: &str) -> Option<&FieldDefinition>
pub fn field_by_name(&self, name: &str) -> Option<&FieldDefinition>
Returns the active field definition with the given source-level name.
Trait Implementations§
Source§impl Clone for RecordDefinition
impl Clone for RecordDefinition
Source§fn clone(&self) -> RecordDefinition
fn clone(&self) -> RecordDefinition
Returns a duplicate of the value. Read more
1.0.0 · 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 RecordDefinition
impl Debug for RecordDefinition
impl Copy for RecordDefinition
Auto Trait Implementations§
impl Freeze for RecordDefinition
impl RefUnwindSafe for RecordDefinition
impl Send for RecordDefinition
impl Sync for RecordDefinition
impl Unpin for RecordDefinition
impl UnsafeUnpin for RecordDefinition
impl UnwindSafe for RecordDefinition
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