pub trait SlotReader {
// Required methods
fn field_contract(&self, slot: usize) -> Result<&FieldModel, InternalError>;
fn has(&self, slot: usize) -> bool;
fn get_bytes(&self, slot: usize) -> Option<&[u8]>;
fn get_scalar(
&self,
slot: usize,
) -> Result<Option<ScalarSlotValueRef<'_>>, InternalError>;
fn get_value(&mut self, slot: usize) -> Result<Option<Value>, InternalError>;
}Expand description
SlotReader
SlotReader exposes one persisted row as stable slot-addressable fields. Callers may inspect field presence, borrow raw field bytes, or decode one field value on demand.
Required Methods§
Sourcefn field_contract(&self, slot: usize) -> Result<&FieldModel, InternalError>
fn field_contract(&self, slot: usize) -> Result<&FieldModel, InternalError>
Resolve one field contract by stable slot index.
Sourcefn has(&self, slot: usize) -> bool
fn has(&self, slot: usize) -> bool
Return whether the given slot is present in the persisted row.
Sourcefn get_bytes(&self, slot: usize) -> Option<&[u8]>
fn get_bytes(&self, slot: usize) -> Option<&[u8]>
Borrow the raw persisted payload for one slot when present.
Sourcefn get_scalar(
&self,
slot: usize,
) -> Result<Option<ScalarSlotValueRef<'_>>, InternalError>
fn get_scalar( &self, slot: usize, ) -> Result<Option<ScalarSlotValueRef<'_>>, InternalError>
Decode one slot as a scalar leaf when the field model declares a scalar codec.