pub struct KvListBuilder { /* private fields */ }Expand description
Builder for flexible queries over a key/value backend.
Use prefix, start, and end keys to define your query range, then call KvListBuilder::entries.
§Examples
use stupid_simple_kv::{Kv, MemoryBackend, KvValue, IntoKey};
let mut kv = Kv::new(Box::new(MemoryBackend::new()));
// List all pairs with prefix (1, _)
let pairs = kv.list().prefix(&(1u64,)).entries().unwrap();
// Range scan from (99,2) up to (99,5)
let result = kv.list().start(&(99u64, 2i64)).end(&(99u64, 5i64)).entries().unwrap();Implementations§
Auto Trait Implementations§
impl Freeze for KvListBuilder
impl RefUnwindSafe for KvListBuilder
impl Send for KvListBuilder
impl Sync for KvListBuilder
impl Unpin for KvListBuilder
impl UnwindSafe for KvListBuilder
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