pub struct FsSeedStore { /* private fields */ }Expand description
The reference seed substrate: one file per node under root/seed.
Layout: root/seed/<aa>/<bb>/<64-hex> where aa/bb are the first two
bytes of the id in hex. Writes are atomic (tmp -> rename); reads are
hash-verified by SeedStore::get_node and strict-range by
SeedStore::get_node_range.
Implementations§
Source§impl FsSeedStore
impl FsSeedStore
Sourcepub fn open(root: impl AsRef<Path>) -> Result<Self>
pub fn open(root: impl AsRef<Path>) -> Result<Self>
Open (creating if needed) a seed store rooted at root, with a fresh,
private I/O counter set.
Sourcepub fn open_with_io(root: impl AsRef<Path>, io: IoCounters) -> Result<Self>
pub fn open_with_io(root: impl AsRef<Path>, io: IoCounters) -> Result<Self>
Open a seed store that accounts every read against io. A caller that
also holds a crate::field::FieldStore shares its counter handle here,
so a seed read made through either handle is attributed to one universe.
Trait Implementations§
Source§impl Debug for FsSeedStore
impl Debug for FsSeedStore
Source§impl SeedStore for FsSeedStore
impl SeedStore for FsSeedStore
Source§fn put_node(&mut self, canonical: &[u8]) -> Result<NodeId>
fn put_node(&mut self, canonical: &[u8]) -> Result<NodeId>
Store the canonical bytes of one node, returning its content id. Read more
Source§fn get_node(&self, id: &NodeId) -> Result<Vec<u8>>
fn get_node(&self, id: &NodeId) -> Result<Vec<u8>>
Fetch the exact canonical bytes for
id. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for FsSeedStore
impl !Send for FsSeedStore
impl !Sync for FsSeedStore
impl !UnwindSafe for FsSeedStore
impl Freeze for FsSeedStore
impl Unpin for FsSeedStore
impl UnsafeUnpin for FsSeedStore
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more