pub struct KvStore { /* private fields */ }Implementations§
Source§impl KvStore
impl KvStore
pub fn open( data_dir: &Path, max_memory_bytes: usize, hot_revision_window: i64, prefix_filter_enabled: bool, revision_filter_enabled: bool, watch_ring_capacity: usize, watch_broadcast_capacity: usize, watch_backlog_mode: WatchBacklogMode, ) -> Result<Self, StoreError>
pub fn reserve_revision(&self) -> i64
pub fn memory_pressure(&self) -> MemoryPressure
pub fn current_revision(&self) -> i64
pub fn compact_revision(&self) -> i64
pub fn compact_to(&self, revision: i64) -> Result<i64, StoreError>
pub fn is_empty(&self) -> bool
pub fn put( &self, key: Vec<u8>, value: Vec<u8>, lease: i64, ignore_value: bool, ignore_lease: bool, ) -> Result<PutOutput, StoreError>
pub fn apply_put_at_revision( &self, key: Vec<u8>, value: Vec<u8>, lease: i64, ignore_value: bool, ignore_lease: bool, revision: i64, ) -> Result<PutOutput, StoreError>
pub fn range( &self, key: &[u8], range_end: &[u8], limit: i64, revision: i64, keys_only: bool, count_only: bool, ) -> Result<RangeOutput, StoreError>
pub fn delete_range( &self, key: &[u8], range_end: &[u8], prev_kv: bool, ) -> Result<DeleteOutput, StoreError>
pub fn apply_delete_at_revision( &self, key: &[u8], range_end: &[u8], prev_kv: bool, revision: i64, ) -> Result<DeleteOutput, StoreError>
pub fn subscribe_watch(&self, filter: WatchFilter) -> WatchSubscription
pub fn lease_grant( &self, id: i64, ttl: i64, ) -> Result<LeaseGrantOutput, StoreError>
pub fn lease_keep_alive(&self, id: i64) -> Result<LeaseGrantOutput, StoreError>
pub fn lease_time_to_live( &self, id: i64, include_keys: bool, ) -> Result<LeaseTtlOutput, StoreError>
pub fn lease_list(&self) -> Vec<i64>
pub fn lease_revoke(&self, id: i64) -> Result<LeaseRevokeOutput, StoreError>
pub fn apply_lease_revoke_at_revision( &self, id: i64, revision: i64, ) -> Result<LeaseRevokeOutput, StoreError>
pub fn snapshot_state(&self) -> SnapshotState
pub fn load_snapshot_state( &self, snapshot: SnapshotState, ) -> Result<(), StoreError>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for KvStore
impl !RefUnwindSafe for KvStore
impl Send for KvStore
impl Sync for KvStore
impl Unpin for KvStore
impl UnsafeUnpin for KvStore
impl !UnwindSafe for KvStore
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> 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> 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::RequestCreates a shared type from an unshared type.