MultiVersionTransaction

Trait MultiVersionTransaction 

Source
pub trait MultiVersionTransaction:
    WithEventBus
    + Send
    + Sync
    + Clone
    + 'static {
    type Query: MultiVersionQueryTransaction;
    type Command: MultiVersionCommandTransaction;

    // Required methods
    fn begin_query(&self) -> Result<Self::Query>;
    fn begin_command(&self) -> Result<Self::Command>;

    // Provided methods
    fn with_query<F, R>(&self, f: F) -> Result<R>
       where F: FnOnce(&mut Self::Query) -> Result<R> { ... }
    fn with_command<F, R>(&self, f: F) -> Result<R>
       where F: FnOnce(&mut Self::Command) -> Result<R> { ... }
}

Required Associated Types§

Required Methods§

Source

fn begin_query(&self) -> Result<Self::Query>

Source

fn begin_command(&self) -> Result<Self::Command>

Provided Methods§

Source

fn with_query<F, R>(&self, f: F) -> Result<R>
where F: FnOnce(&mut Self::Query) -> Result<R>,

Source

fn with_command<F, R>(&self, f: F) -> Result<R>
where F: FnOnce(&mut Self::Command) -> 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§