linera_views::batch

Trait DeletePrefixExpander

Source
pub trait DeletePrefixExpander: Send {
    type Error: Debug;

    // Required method
    fn expand_delete_prefix(
        &self,
        key_prefix: &[u8],
    ) -> impl Future<Output = Result<Vec<Vec<u8>>, Self::Error>> + Send;
}
Expand description

A trait to expand DeletePrefix operations.

Certain databases (e.g. DynamoDB) do not support the deletion by prefix. Thus we need to access the databases in order to replace a DeletePrefix by a vector of the keys to be removed.

Required Associated Types§

Source

type Error: Debug

The error type that can happen when expanding the key prefix.

Required Methods§

Source

fn expand_delete_prefix( &self, key_prefix: &[u8], ) -> impl Future<Output = Result<Vec<Vec<u8>>, Self::Error>> + Send

Returns the list of keys to be appended to the list.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§