#[non_exhaustive]pub enum Need {
Read,
Write,
Delete,
Stat,
List,
CreateIfAbsent,
AtomicReplace,
MaxValueSize(u64),
}Expand description
A guarantee a program declares it needs from its backend.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Read
Read a value by key.
Write
Write a value by key.
Delete
Delete a key.
Stat
Ask whether a key exists, and its size.
List
List keys under a prefix.
CreateIfAbsent
Write only if the key does not exist yet.
AtomicReplace
Replace a value so a reader sees the old or the new content, never a mix, even across an interrupted write.
MaxValueSize(u64)
Values up to this many bytes can be written in one piece.
Trait Implementations§
impl Copy for Need
impl Eq for Need
impl StructuralPartialEq for Need
Auto Trait Implementations§
impl Freeze for Need
impl RefUnwindSafe for Need
impl Send for Need
impl Sync for Need
impl Unpin for Need
impl UnsafeUnpin for Need
impl UnwindSafe for Need
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