pub struct Store { /* private fields */ }Expand description
Rows by key, iterated in key order.
Implementations§
Source§impl Store
impl Store
Sourcepub fn spilling(dir: PathBuf, budget: usize) -> Result<Store>
pub fn spilling(dir: PathBuf, budget: usize) -> Result<Store>
A store that writes blobs into dir once those in memory exceed budget bytes.
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Sourcepub fn peek(&self, key: &str) -> Option<&Js>
pub fn peek(&self, key: &str) -> Option<&Js>
A reference to the row as stored (a spilled blob reads as empty).
pub fn contains(&self, key: &str) -> bool
pub fn put(&mut self, key: &str, value: Js)
pub fn delete(&mut self, key: &str)
pub fn delete_prefix(&mut self, prefix: &str)
Sourcepub fn iter(&self) -> impl Iterator<Item = (&String, &Js)>
pub fn iter(&self) -> impl Iterator<Item = (&String, &Js)>
Every row, in key order (spilled blobs read as empty; see Store::get).
Sourcepub fn blob_bytes(&self) -> usize
pub fn blob_bytes(&self) -> usize
Blobs held in memory, in bytes.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Store
impl RefUnwindSafe for Store
impl Send for Store
impl Sync for Store
impl Unpin for Store
impl UnsafeUnpin for Store
impl UnwindSafe for Store
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more