Trait mz_persist::indexed::snapshot::SnapshotToOwned
source · [−]pub trait SnapshotToOwned: Sized {
fn snapshot_to_owned(raw: &[u8]) -> Self;
}
Expand description
A type that can be decoded as the K or V of a Snapshot.
It would be natural for Snapshot to bound these K and V parameters with Codec. However, we use Snapshot internally in unsealed draining and trace compaction. Those currently operate directly on the encoded K and V bytes and so decoding them is inappropriate. If we do make this change, then SnapshotToOwned can be deleted.
Required methods
fn snapshot_to_owned(raw: &[u8]) -> Self
fn snapshot_to_owned(raw: &[u8]) -> Self
Decode this from an encoded K or V from a Snapshot.