pub struct WsClient { /* private fields */ }Implementations§
Trait Implementations§
Source§impl AsyncDataStoreReader for WsClient
impl AsyncDataStoreReader for WsClient
type EntryHandleType = Vec<u8>
Source§fn exists<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn exists<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Checks whether a key currently exists in the store. Read more
Source§fn exists_with_key_hash<'life0, 'async_trait>(
&'life0 self,
_prehashed_key: u64,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn exists_with_key_hash<'life0, 'async_trait>(
&'life0 self,
_prehashed_key: u64,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Checks whether a key with a pre-computed hash exists in the store. Read more
Source§fn read<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<Option<Self::EntryHandleType>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn read<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<Option<Self::EntryHandleType>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Retrieves the most recent value associated with a given key. Read more
Source§fn read_with_key_hash<'life0, 'async_trait>(
&'life0 self,
_prehashed_key: u64,
) -> Pin<Box<dyn Future<Output = Result<Option<Self::EntryHandleType>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn read_with_key_hash<'life0, 'async_trait>(
&'life0 self,
_prehashed_key: u64,
) -> Pin<Box<dyn Future<Output = Result<Option<Self::EntryHandleType>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Retrieves the most recent value associated with a pre-computed key hash. Read more
Source§fn read_last_entry<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<Self::EntryHandleType>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn read_last_entry<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<Self::EntryHandleType>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Retrieves the last entry written to the file. Read more
Source§fn batch_read<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
keys: &'life1 [&'life2 [u8]],
) -> Pin<Box<dyn Future<Output = Result<Vec<Option<Self::EntryHandleType>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn batch_read<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
keys: &'life1 [&'life2 [u8]],
) -> Pin<Box<dyn Future<Output = Result<Vec<Option<Self::EntryHandleType>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Reads many keys in one shot. Read more
Source§fn batch_read_hashed_keys<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_prehashed_keys: &'life1 [u64],
_non_hashed_keys: Option<&'life2 [&'life3 [u8]]>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Option<Self::EntryHandleType>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn batch_read_hashed_keys<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_prehashed_keys: &'life1 [u64],
_non_hashed_keys: Option<&'life2 [&'life3 [u8]]>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Option<Self::EntryHandleType>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Reads many keys in one shot using pre-computed hashes. Read more
Source§fn read_metadata<'life0, 'life1, 'async_trait>(
&'life0 self,
_key: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<Option<EntryMetadata>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn read_metadata<'life0, 'life1, 'async_trait>(
&'life0 self,
_key: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<Option<EntryMetadata>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Retrieves metadata for a given key. Read more
Source§fn len<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn len<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Counts active (non-deleted) key-value pairs in the storage. Read more
Source§impl AsyncDataStoreWriter for WsClient
impl AsyncDataStoreWriter for WsClient
Source§fn write_stream<'life0, 'life1, 'life2, 'async_trait, R>(
&'life0 self,
_key: &'life1 [u8],
_reader: &'life2 mut R,
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
R: 'async_trait + Read,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn write_stream<'life0, 'life1, 'life2, 'async_trait, R>(
&'life0 self,
_key: &'life1 [u8],
_reader: &'life2 mut R,
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
R: 'async_trait + Read,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Writes an entry using a streaming
Read source (e.g., file, network). Read moreSource§fn write_stream_with_key_hash<'life0, 'life1, 'async_trait, R>(
&'life0 self,
_key_hash: u64,
_reader: &'life1 mut R,
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
R: 'async_trait + Read,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn write_stream_with_key_hash<'life0, 'life1, 'async_trait, R>(
&'life0 self,
_key_hash: u64,
_reader: &'life1 mut R,
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
R: 'async_trait + Read,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Writes an entry using a precomputed key hash and a streaming
Read source. Read moreSource§fn write<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 [u8],
payload: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn write<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 [u8],
payload: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Writes an entry with a given key and payload. Read more
Source§fn write_with_key_hash<'life0, 'life1, 'async_trait>(
&'life0 self,
_key_hash: u64,
_payload: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn write_with_key_hash<'life0, 'life1, 'async_trait>(
&'life0 self,
_key_hash: u64,
_payload: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Writes an entry using a precomputed key hash and a payload. Read more
Source§fn batch_write<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
entries: &'life1 [(&'life2 [u8], &'life3 [u8])],
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn batch_write<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
entries: &'life1 [(&'life2 [u8], &'life3 [u8])],
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Writes multiple key-value pairs as a single transaction. Read more
Source§fn batch_write_with_key_hashes<'life0, 'life1, 'async_trait>(
&'life0 self,
_prehashed_keys: Vec<(u64, &'life1 [u8])>,
_allow_null_bytes: bool,
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn batch_write_with_key_hashes<'life0, 'life1, 'async_trait>(
&'life0 self,
_prehashed_keys: Vec<(u64, &'life1 [u8])>,
_allow_null_bytes: bool,
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Writes multiple key-value pairs as a single transaction, using precomputed key hashes. Read more
Source§fn rename<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_old_key: &'life1 [u8],
_new_key: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn rename<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_old_key: &'life1 [u8],
_new_key: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Renames an existing entry by copying it under a new key and marking the old key as deleted. Read more
Source§fn copy<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_key: &'life1 [u8],
_target: &'life2 DataStore,
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn copy<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_key: &'life1 [u8],
_target: &'life2 DataStore,
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Copies an entry to a different storage container. Read more
Source§fn transfer<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_key: &'life1 [u8],
_target: &'life2 DataStore,
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn transfer<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_key: &'life1 [u8],
_target: &'life2 DataStore,
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Moves an entry from the current storage to a different storage container. Read more
Source§fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Logically deletes an entry by its key. Read more
Source§fn batch_delete<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_keys: &'life1 [&'life2 [u8]],
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn batch_delete<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_keys: &'life1 [&'life2 [u8]],
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Deletes a batch of entries from the storage by their keys. Read more
Source§fn batch_delete_key_hashes<'life0, 'life1, 'async_trait>(
&'life0 self,
_prehashed_keys: &'life1 [u64],
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn batch_delete_key_hashes<'life0, 'life1, 'async_trait>(
&'life0 self,
_prehashed_keys: &'life1 [u64],
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Deletes a batch of entries from the storage using pre-computed key hashes. Read more
Auto Trait Implementations§
impl Freeze for WsClient
impl !RefUnwindSafe for WsClient
impl Send for WsClient
impl Sync for WsClient
impl Unpin for WsClient
impl !UnwindSafe for WsClient
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