SingleVersionTransaction

Trait SingleVersionTransaction 

Source
pub trait SingleVersionTransaction:
    WithEventBus
    + Send
    + Sync
    + Clone
    + 'static {
    type Query<'a>: SingleVersionQueryTransaction;
    type Command<'a>: SingleVersionCommandTransaction;

    // Required methods
    fn begin_query<'a, I>(&self, keys: I) -> Result<Self::Query<'_>>
       where I: IntoIterator<Item = &'a EncodedKey>;
    fn begin_command<'a, I>(&self, keys: I) -> Result<Self::Command<'_>>
       where I: IntoIterator<Item = &'a EncodedKey>;

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

Required Associated Types§

Required Methods§

Source

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

Source

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

Provided Methods§

Source

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

Source

fn with_command<'a, I, F, R>(&self, keys: I, f: F) -> Result<R>
where I: IntoIterator<Item = &'a EncodedKey>, 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§