pub struct KeyValueSdk { /* private fields */ }Implementations§
Source§impl KeyValueSdk
impl KeyValueSdk
pub fn new() -> Self
pub fn set(&self, key: KeyId, value: Vec<u8>, ex: Option<u64>)
pub async fn get( &self, key: KeyId, timeout_ms: u64, ) -> Result<Option<(ValueType, KeyVersion, KeySource)>, SimpleKeyValueGetError>
pub fn del(&self, key: KeyId)
pub fn subscribe( &self, key: KeyId, ex: Option<u64>, ) -> Subscriber<u64, (KeyId, Option<ValueType>, KeyVersion, KeySource)>
pub fn hset( &self, key: KeyId, sub_key: SubKeyId, value: Vec<u8>, ex: Option<u64>, )
pub async fn hget( &self, key: KeyId, timeout_ms: u64, ) -> Result<Option<Vec<(SubKeyId, ValueType, KeyVersion, KeySource)>>, HashmapKeyValueGetError>
pub fn hdel(&self, key: KeyId, sub_key: SubKeyId)
pub fn hsubscribe( &self, key: u64, ex: Option<u64>, ) -> Subscriber<u64, (KeyId, SubKeyId, Option<ValueType>, KeyVersion, KeySource)>
pub fn hsubscribe_raw( &self, key: u64, uuid: u64, ex: Option<u64>, tx: Sender<(KeyId, SubKeyId, Option<ValueType>, KeyVersion, KeySource)>, )
pub fn hunsubscribe_raw(&self, key: u64, uuid: u64)
Trait Implementations§
Source§impl Clone for KeyValueSdk
impl Clone for KeyValueSdk
Source§fn clone(&self) -> KeyValueSdk
fn clone(&self) -> KeyValueSdk
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl ExternalControl for KeyValueSdk
impl ExternalControl for KeyValueSdk
fn set_awaker(&self, awaker: Arc<dyn Awaker>)
fn on_event(&self, event: KeyValueSdkEvent)
fn pop_action(&self) -> Option<KeyValueSdkEvent>
Auto Trait Implementations§
impl Freeze for KeyValueSdk
impl !RefUnwindSafe for KeyValueSdk
impl Send for KeyValueSdk
impl Sync for KeyValueSdk
impl Unpin for KeyValueSdk
impl !UnwindSafe for KeyValueSdk
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