CommandTransaction

Trait CommandTransaction 

Source
pub trait CommandTransaction: MultiVersionCommandTransaction + QueryTransaction {
    type SingleVersionCommand<'a>: SingleVersionCommandTransaction
       where Self: 'a;

    // Required methods
    fn begin_single_command<'a, I>(
        &self,
        keys: I,
    ) -> Result<Self::SingleVersionCommand<'_>>
       where I: IntoIterator<Item = &'a EncodedKey>;
    fn get_changes(&self) -> &TransactionalDefChanges;

    // Provided method
    fn with_single_command<'a, I, F, R>(&self, keys: I, f: F) -> Result<R>
       where I: IntoIterator<Item = &'a EncodedKey>,
             F: FnOnce(&mut Self::SingleVersionCommand<'_>) -> Result<R> { ... }
}

Required Associated Types§

Required Methods§

Source

fn begin_single_command<'a, I>( &self, keys: I, ) -> Result<Self::SingleVersionCommand<'_>>
where I: IntoIterator<Item = &'a EncodedKey>,

Source

fn get_changes(&self) -> &TransactionalDefChanges

Get reference to catalog changes for this transaction

Provided Methods§

Source

fn with_single_command<'a, I, F, R>(&self, keys: I, f: F) -> Result<R>
where I: IntoIterator<Item = &'a EncodedKey>, F: FnOnce(&mut Self::SingleVersionCommand<'_>) -> Result<R>,

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§