pub trait SlotReader {
// Required methods
fn model(&self) -> &'static EntityModel;
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 model(&self) -> &'static EntityModel
fn model(&self) -> &'static EntityModel
Return the structural model that owns this slot mapping.
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.