pub trait SingleVersionTransaction:
WithEventBus
+ Send
+ Sync
+ Clone
+ 'static {
type Query<'a>: SingleVersionQueryTransaction;
type Command<'a>: SingleVersionCommandTransaction;
// 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§
type Query<'a>: SingleVersionQueryTransaction
type Command<'a>: SingleVersionCommandTransaction
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>
fn with_command<F, R>(&self, f: F) -> 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.