Trait linera_views::batch::LocalDeletePrefixExpander

source ·
pub trait LocalDeletePrefixExpander {
    type Error: Debug;

    // Required method
    async fn expand_delete_prefix(
        &self,
        key_prefix: &[u8],
    ) -> Result<Vec<Vec<u8>>, Self::Error>;
}
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

async fn expand_delete_prefix( &self, key_prefix: &[u8], ) -> Result<Vec<Vec<u8>>, Self::Error>

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

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<TraitVariantBlanketType: DeletePrefixExpander> LocalDeletePrefixExpander for TraitVariantBlanketType

§

type Error = <TraitVariantBlanketType as DeletePrefixExpander>::Error