pub enum KvCommand {
Put {
model: CollectionModel,
collection: String,
key: String,
value: Value,
ttl_ms: Option<u64>,
tags: Vec<String>,
if_not_exists: bool,
},
InvalidateTags {
collection: String,
tags: Vec<String>,
},
Get {
model: CollectionModel,
collection: String,
key: String,
},
Unseal {
collection: String,
key: String,
version: Option<i64>,
},
Rotate {
collection: String,
key: String,
value: Value,
tags: Vec<String>,
},
History {
collection: String,
key: String,
},
List {
model: CollectionModel,
collection: String,
prefix: Option<String>,
limit: Option<usize>,
offset: usize,
},
Purge {
collection: String,
key: String,
},
Watch {
model: CollectionModel,
collection: String,
key: String,
prefix: bool,
from_lsn: Option<u64>,
},
Delete {
model: CollectionModel,
collection: String,
key: String,
},
Incr {
model: CollectionModel,
collection: String,
key: String,
by: i64,
ttl_ms: Option<u64>,
},
Cas {
model: CollectionModel,
collection: String,
key: String,
expected: Option<Value>,
new_value: Value,
ttl_ms: Option<u64>,
},
}Expand description
KV verb commands: KV PUT key = value [EXPIRE n] [IF NOT EXISTS], KV GET key, KV DELETE key
Variants§
Put
InvalidateTags
Get
Unseal
Rotate
History
List
Fields
§
model: CollectionModelPurge
Watch
Delete
Incr
KV INCR key [BY n] [EXPIRE dur] — atomic increment; negative by = decrement.
Fields
§
model: CollectionModelCas
KV CAS key EXPECT <expected|NULL> SET <new> [EXPIRE dur] — compare-and-set.
expected = None means EXPECT NULL (key must be absent).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KvCommand
impl RefUnwindSafe for KvCommand
impl Send for KvCommand
impl Sync for KvCommand
impl Unpin for KvCommand
impl UnsafeUnpin for KvCommand
impl UnwindSafe for KvCommand
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request