pub struct MemStore { /* private fields */ }Implementations§
Source§impl MemStore
impl MemStore
pub fn new(log_limit_bytes: usize, subscriber_queue: usize) -> Arc<MemStore> ⓘ
pub fn rev(&self) -> u64
pub fn get(&self, key: &str) -> Option<Bytes>
pub fn list(&self, prefix: &str) -> Snapshot
pub fn put(&self, key: &str, build: impl FnOnce(u64) -> Bytes) -> u64
pub fn delete( &self, key: &str, build: impl FnOnce(u64, &Bytes) -> Bytes, ) -> Option<u64>
pub fn put_checked<E>( &self, key: &str, build: impl FnOnce(Option<&Bytes>, u64) -> Result<Bytes, E>, ) -> Result<(u64, Bytes), E>
pub fn delete_checked<E>( &self, key: &str, build: impl FnOnce(&Bytes, u64) -> Result<Bytes, E>, ) -> Result<Option<(u64, Bytes)>, E>
pub fn watch( &self, prefix: &str, since: Option<u64>, ) -> Result<Watch, WatchError>
pub fn log_bytes(&self) -> usize
Auto Trait Implementations§
impl !Freeze for MemStore
impl !RefUnwindSafe for MemStore
impl !UnwindSafe for MemStore
impl Forget for MemStore
impl Move for MemStore
impl Send for MemStore
impl Sync for MemStore
impl Unpin for MemStorewhere
Align4<u32>: Unpin,
Align1<u8>: Unpin,
*const LeafNode<Arc<str>, Bytes> is !null: Unpin,
Box<(Arc<str>, Bytes)>: Unpin,
*const u8 is !null: Unpin,
Arc<str>: Unpin,
*const u8: Unpin,
Align8<*mut ()>: Unpin,
&'static Vtable: Unpin,
Arc<Shared<Event>>: Unpin,
Arc<Database>: Unpin,
Arc<Atomic<bool>>: Unpin,
*mut Counter<Channel<()>>: Unpin,
*mut Counter<Channel<()>>: Unpin,
*mut Counter<Channel<()>>: Unpin,
Arc<Inner, System>: Unpin,
Arc<Packet<'static, ()>>: Unpin,
impl UnsafeUnpin for MemStorewhere
Align4<u32>: UnsafeUnpin,
Align1<u8>: UnsafeUnpin,
*const LeafNode<Arc<str>, Bytes> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(Arc<str>, Bytes)>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<Event>: UnsafeUnpin,
*const ArcInner<Shared<Event>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Shared<Event>>>: UnsafeUnpin,
*const ArcInner<Database> is !null: UnsafeUnpin,
PhantomData<ArcInner<Database>>: UnsafeUnpin,
*const ArcInner<Atomic<bool>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Atomic<bool>>>: UnsafeUnpin,
*mut Counter<Channel<()>>: UnsafeUnpin,
*mut Counter<Channel<()>>: UnsafeUnpin,
*mut Counter<Channel<()>>: UnsafeUnpin,
*const ArcInner<Inner> is !null: UnsafeUnpin,
PhantomData<ArcInner<Inner>>: UnsafeUnpin,
*const ArcInner<Packet<'static, ()>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Packet<'static, ()>>>: UnsafeUnpin,
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