pub trait IDatabaseTransactionOpsCore: MaybeSend {
// Required methods
fn raw_insert_bytes<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
key: &'life1 [u8],
value: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn raw_get_bytes<'life0, 'life1, 'async_trait>(
&'life0 mut self,
key: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn raw_remove_entry<'life0, 'life1, 'async_trait>(
&'life0 mut self,
key: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn raw_find_by_prefix<'life0, 'life1, 'async_trait>(
&'life0 mut self,
key_prefix: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<PrefixStream<'_>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn raw_find_by_prefix_sorted_descending<'life0, 'life1, 'async_trait>(
&'life0 mut self,
key_prefix: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<PrefixStream<'_>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn raw_find_by_range<'life0, 'life1, 'async_trait>(
&'life0 mut self,
range: Range<&'life1 [u8]>,
) -> Pin<Box<dyn Future<Output = Result<PrefixStream<'_>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn raw_remove_by_prefix<'life0, 'life1, 'async_trait>(
&'life0 mut self,
key_prefix: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}
Expand description
Core raw a operations database transactions supports
Used to enforce the same signature on all types supporting it
Required Methods§
Sourcefn raw_insert_bytes<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
key: &'life1 [u8],
value: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn raw_insert_bytes<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
key: &'life1 [u8],
value: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Insert entry
Sourcefn raw_get_bytes<'life0, 'life1, 'async_trait>(
&'life0 mut self,
key: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn raw_get_bytes<'life0, 'life1, 'async_trait>(
&'life0 mut self,
key: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get key value
Sourcefn raw_remove_entry<'life0, 'life1, 'async_trait>(
&'life0 mut self,
key: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn raw_remove_entry<'life0, 'life1, 'async_trait>(
&'life0 mut self,
key: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Remove entry by key
Sourcefn raw_find_by_prefix<'life0, 'life1, 'async_trait>(
&'life0 mut self,
key_prefix: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<PrefixStream<'_>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn raw_find_by_prefix<'life0, 'life1, 'async_trait>(
&'life0 mut self,
key_prefix: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<PrefixStream<'_>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Returns an stream of key-value pairs with keys that start with
key_prefix
, sorted by key.
Sourcefn raw_find_by_prefix_sorted_descending<'life0, 'life1, 'async_trait>(
&'life0 mut self,
key_prefix: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<PrefixStream<'_>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn raw_find_by_prefix_sorted_descending<'life0, 'life1, 'async_trait>(
&'life0 mut self,
key_prefix: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<PrefixStream<'_>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Same as Self::raw_find_by_prefix
but the order is descending by key.
Sourcefn raw_find_by_range<'life0, 'life1, 'async_trait>(
&'life0 mut self,
range: Range<&'life1 [u8]>,
) -> Pin<Box<dyn Future<Output = Result<PrefixStream<'_>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn raw_find_by_range<'life0, 'life1, 'async_trait>(
&'life0 mut self,
range: Range<&'life1 [u8]>,
) -> Pin<Box<dyn Future<Output = Result<PrefixStream<'_>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Returns an stream of key-value pairs with keys within a range
, sorted
by key. Range
is an (half-open) range bounded inclusively below and
exclusively above.