pub trait SnapshotWidth: SnapshotWidth + LayoutIndex {
type LittleEndianWord: LayoutSnapshotWord<Index = Self>;
// Required methods
fn to_le_word(self) -> Self::LittleEndianWord;
fn from_le_word(word: Self::LittleEndianWord) -> Self;
}Expand description
A persisted unsigned width with its little-endian storage word.
This is the single width-to-LE-word bijection shared by oxgraph-csr,
oxgraph-hyper-bcsr, and any future layout crate. usize deliberately does
not implement it: persisted snapshots are fixed-width.
§Performance
SnapshotWidth::to_le_word and SnapshotWidth::from_le_word are O(1).
Required Associated Types§
Sourcetype LittleEndianWord: LayoutSnapshotWord<Index = Self>
type LittleEndianWord: LayoutSnapshotWord<Index = Self>
Little-endian storage word for this width.
Required Methods§
Sourcefn to_le_word(self) -> Self::LittleEndianWord
fn to_le_word(self) -> Self::LittleEndianWord
Sourcefn from_le_word(word: Self::LittleEndianWord) -> Self
fn from_le_word(word: Self::LittleEndianWord) -> Self
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".