pub trait PersistedRow: EntityKind + Sized {
// Required methods
fn materialize_from_slots(
slots: &mut dyn SlotReader,
) -> Result<Self, InternalError>;
fn write_slots(&self, out: &mut dyn SlotWriter) -> Result<(), InternalError>;
// Provided method
fn project_slot(
slots: &mut dyn SlotReader,
slot: usize,
) -> Result<Option<Value>, InternalError>
where Self: FieldProjection { ... }
}Expand description
PersistedRow
PersistedRow is the derive-owned bridge between typed entities and slot-addressable persisted rows. It owns entity-specific materialization/default semantics while runtime paths stay structural at the row boundary.
Required Methods§
Sourcefn materialize_from_slots(
slots: &mut dyn SlotReader,
) -> Result<Self, InternalError>
fn materialize_from_slots( slots: &mut dyn SlotReader, ) -> Result<Self, InternalError>
Materialize one typed entity from one slot reader.
Sourcefn write_slots(&self, out: &mut dyn SlotWriter) -> Result<(), InternalError>
fn write_slots(&self, out: &mut dyn SlotWriter) -> Result<(), InternalError>
Write one typed entity into one slot writer.
Provided Methods§
Sourcefn project_slot(
slots: &mut dyn SlotReader,
slot: usize,
) -> Result<Option<Value>, InternalError>where
Self: FieldProjection,
fn project_slot(
slots: &mut dyn SlotReader,
slot: usize,
) -> Result<Option<Value>, InternalError>where
Self: FieldProjection,
Decode one slot value needed by structural planner/projection consumers.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.