pub enum ClientRequest {
Show 15 variants
Get {
ns: Namespace,
key: StructuredKey,
},
Put {
ns: Namespace,
key: StructuredKey,
value: Vec<u8>,
ttl_ms: Option<u64>,
dimensions: Vec<String>,
},
Invalidate {
ns: Namespace,
key: StructuredKey,
},
BatchGet {
ns: Namespace,
keys: Vec<StructuredKey>,
},
BatchPut {
ns: Namespace,
entries: Vec<BatchPutEntry>,
},
EvictRegion {
ns: Namespace,
},
SubscribeInvalidations {
ns: Namespace,
region: Option<RegionId>,
from: Option<Watermark>,
include_value: bool,
},
SubscribeEntryEvents {
ns: Namespace,
region: Option<RegionId>,
from: Option<Watermark>,
include_value: bool,
projection: EntryEventProjection,
},
TryLock {
ns: Namespace,
key: StructuredKey,
lease_ms: u64,
wait_ms: u64,
level: LockConsistency,
},
Unlock {
ns: Namespace,
key: StructuredKey,
fence: u64,
},
RenewLockLease {
ns: Namespace,
key: StructuredKey,
fence: u64,
lease_ms: u64,
},
ForceUnlock {
ns: Namespace,
key: StructuredKey,
},
GetLockOwnership {
ns: Namespace,
key: StructuredKey,
},
CompareAndSet {
ns: Namespace,
key: StructuredKey,
expected: CasExpectation,
new_value: Vec<u8>,
level: LockConsistency,
},
RemoveIfValue {
ns: Namespace,
key: StructuredKey,
expected: Vec<u8>,
level: LockConsistency,
},
}Expand description
Client operations.
Variants§
Get
Read one key.
Put
Store one value.
Invalidate
Invalidate one key.
BatchGet
Read many keys.
BatchPut
Store many key/value pairs.
EvictRegion
Evict a whole namespace/region mapping.
SubscribeInvalidations
Subscribe to invalidations.
SubscribeEntryEvents
Subscribe to IMap entry-event shaped cache signals.
Fields
§
projection: EntryEventProjectionTryLock
Try to acquire a session-bound fenced lock.
Unlock
Release a fenced lock with the current fence token.
RenewLockLease
Renew the lease for the current lock owner.
ForceUnlock
Privileged fence-advancing release.
GetLockOwnership
Read current lock ownership metadata.
CompareAndSet
Single-key compare-and-set for IMap replace ergonomics.
RemoveIfValue
Single-key conditional tombstone for IMap remove(key, value).
Implementations§
Source§impl ClientRequest
impl ClientRequest
Sourcepub fn minimum_protocol_version(&self) -> u16
pub fn minimum_protocol_version(&self) -> u16
Minimum protocol version required by this operation.
Sourcepub fn ensure_supported_by(
&self,
protocol_version: u16,
) -> Result<(), ClientErrorEnvelope>
pub fn ensure_supported_by( &self, protocol_version: u16, ) -> Result<(), ClientErrorEnvelope>
Validate this operation against a negotiated protocol version.
Trait Implementations§
Source§impl Clone for ClientRequest
impl Clone for ClientRequest
Source§fn clone(&self) -> ClientRequest
fn clone(&self) -> ClientRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ClientRequest
impl Debug for ClientRequest
Source§impl<'de> Deserialize<'de> for ClientRequest
impl<'de> Deserialize<'de> for ClientRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ClientRequest
Source§impl PartialEq for ClientRequest
impl PartialEq for ClientRequest
Source§fn eq(&self, other: &ClientRequest) -> bool
fn eq(&self, other: &ClientRequest) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ClientRequest
impl Serialize for ClientRequest
impl StructuralPartialEq for ClientRequest
Auto Trait Implementations§
impl Freeze for ClientRequest
impl RefUnwindSafe for ClientRequest
impl Send for ClientRequest
impl Sync for ClientRequest
impl Unpin for ClientRequest
impl UnsafeUnpin for ClientRequest
impl UnwindSafe for ClientRequest
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