pub struct SledStorage { /* private fields */ }Expand description
Sled-backed implementation of StorageEngine.
Implementations§
Source§impl SledStorage
impl SledStorage
pub fn open( config: SledConfig, key_provider: Arc<dyn KeyProvider>, ) -> Result<Self>
pub fn open_with_env(config: SledConfig) -> Result<Self>
Sourcepub fn append_atoms(
&self,
world: &WorldKey,
atoms: Vec<Atom>,
) -> Result<Vec<AtomId>>
pub fn append_atoms( &self, world: &WorldKey, atoms: Vec<Atom>, ) -> Result<Vec<AtomId>>
Append a batch of atoms to the same world, returning their ids.
Sourcepub fn rebuild_index(&self) -> Result<u64>
pub fn rebuild_index(&self) -> Result<u64>
Rebuild the atom id index from existing worlds/logs; returns entries written.
Trait Implementations§
Source§impl StorageEngine for SledStorage
impl StorageEngine for SledStorage
fn append(&self, atom: Atom) -> Result<()>
fn get_by_ids(&self, ids: &[AtomId]) -> Result<Vec<Atom>>
fn scan(&self, world: &WorldKey, filter: &AtomFilter) -> Result<Vec<Atom>>
fn stats(&self, world: &WorldKey) -> Result<StorageStats>
Source§fn list_ids_in_window(
&self,
world: &WorldKey,
window: &TimeWindow,
) -> Result<Vec<AtomId>>
fn list_ids_in_window( &self, world: &WorldKey, window: &TimeWindow, ) -> Result<Vec<AtomId>>
Return atom ids for a world constrained by time window (ms since epoch).
Auto Trait Implementations§
impl Freeze for SledStorage
impl !RefUnwindSafe for SledStorage
impl Send for SledStorage
impl Sync for SledStorage
impl Unpin for SledStorage
impl UnsafeUnpin for SledStorage
impl !UnwindSafe for SledStorage
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