pub trait PagableSerializer {
// Required methods
fn serde(&mut self) -> &mut Serializer<PagableVecFlavor>;
fn serialize_arc(&mut self, arc: &dyn ArcEraseDyn) -> Result<()>;
fn position(&mut self) -> PagableCursor;
fn session_context(&mut self) -> &SessionContext;
// Provided method
unsafe fn write_at(&mut self, pos: usize, bytes: &[u8]) { ... }
}Expand description
Trait for serializers that support pagable serialization.
Implementors provide access to an underlying serde serializer and the ability to preserve arc instance equality across serialization.
Required Methods§
Sourcefn serde(&mut self) -> &mut Serializer<PagableVecFlavor>
fn serde(&mut self) -> &mut Serializer<PagableVecFlavor>
Get a mutable reference to the underlying postcard serializer.
Sourcefn serialize_arc(&mut self, arc: &dyn ArcEraseDyn) -> Result<()>
fn serialize_arc(&mut self, arc: &dyn ArcEraseDyn) -> Result<()>
Serialize an Arc, preserving its identity for deduplication.
Implementations should track Arc identity so that the same Arc serialized multiple times results in shared references after deserialization.
Sourcefn position(&mut self) -> PagableCursor
fn position(&mut self) -> PagableCursor
Current cursor position (byte position + arc index).
Sourcefn session_context(&mut self) -> &SessionContext
fn session_context(&mut self) -> &SessionContext
Access the session context for storing/retrieving layer-specific state.
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".