linera_views::batch

Trait 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.

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§

Source§

impl<TraitVariantBlanketType: DeletePrefixExpander> LocalDeletePrefixExpander for TraitVariantBlanketType

Source§

type Error = <TraitVariantBlanketType as DeletePrefixExpander>::Error