Trait linera_views::batch::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.

Object Safety§

This trait is not object safe.

Implementors§