pub struct SingleTransaction { /* private fields */ }Implementations§
Source§impl SingleTransaction
impl SingleTransaction
pub fn new(store: SingleStore, event_bus: EventBus) -> Self
pub fn read_store(&self) -> SingleStore
pub fn testing() -> Self
pub fn with_query<'a, I, F, R>(&self, keys: I, f: F) -> Result<R>where
I: IntoIterator<Item = &'a EncodedKey>,
F: FnOnce(&mut SingleReadTransaction<'_>) -> Result<R>,
pub fn with_command<'a, I, F, R>(&self, keys: I, f: F) -> Result<R>where
I: IntoIterator<Item = &'a EncodedKey>,
F: FnOnce(&mut SingleWriteTransaction<'_>) -> Result<R>,
pub fn begin_query<'a, I>(&self, keys: I) -> Result<SingleReadTransaction<'_>>where
I: IntoIterator<Item = &'a EncodedKey>,
pub fn begin_command<'a, I>(
&self,
keys: I,
) -> Result<SingleWriteTransaction<'_>>where
I: IntoIterator<Item = &'a EncodedKey>,
pub fn begin_command_ranged<'a, I>(
&self,
lock_keys: I,
ranges: Vec<EncodedKeyRange>,
) -> Result<SingleWriteTransaction<'_>>where
I: IntoIterator<Item = &'a EncodedKey>,
Trait Implementations§
Source§impl Clone for SingleTransaction
impl Clone for SingleTransaction
Source§fn clone(&self) -> SingleTransaction
fn clone(&self) -> SingleTransaction
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl WithEventBus for SingleTransaction
impl WithEventBus for SingleTransaction
Auto Trait Implementations§
impl !RefUnwindSafe for SingleTransaction
impl !UnwindSafe for SingleTransaction
impl Freeze for SingleTransaction
impl Send for SingleTransaction
impl Sync for SingleTransaction
impl Unpin for SingleTransaction
impl UnsafeUnpin for SingleTransaction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more