pub struct ReadModelWritePlanBuilder { /* private fields */ }Expand description
Detached builder for read-model write plans that are applied at commit.
Implementations§
Source§impl ReadModelWritePlanBuilder
impl ReadModelWritePlanBuilder
pub fn new() -> Self
pub fn is_empty(&self) -> bool
pub fn load<M>(
&self,
key: RowKey,
) -> Result<ReadModelLoadRequest, ReadModelError>where
M: RelationalReadModel,
pub fn load_with<M, I, S>( &self, key: RowKey, includes: I, ) -> Result<ReadModelLoadRequest, ReadModelError>
pub fn track_loaded<M>(
&mut self,
versioned: &Versioned<M>,
) -> Result<&mut Self, ReadModelError>where
M: RelationalReadModel,
pub fn expect_version<M>(
&mut self,
key: RowKey,
expected_version: u64,
) -> Result<&mut Self, ReadModelError>where
M: RelationalReadModel,
pub fn insert<M>(&mut self, model: &M) -> Result<&mut Self, ReadModelError>where
M: RelationalReadModel,
pub fn upsert<M>(&mut self, model: &M) -> Result<&mut Self, ReadModelError>where
M: RelationalReadModel,
pub fn patch<M>(
&mut self,
key: RowKey,
patch: RowPatch,
) -> Result<&mut Self, ReadModelError>where
M: RelationalReadModel,
pub fn upsert_patch<M>(
&mut self,
key: RowKey,
patch: RowPatch,
) -> Result<&mut Self, ReadModelError>where
M: RelationalReadModel,
pub fn delete<M>(&mut self, key: RowKey) -> Result<&mut Self, ReadModelError>where
M: RelationalReadModel,
pub fn delete_model<M>(
&mut self,
model: &M,
) -> Result<&mut Self, ReadModelError>where
M: RelationalReadModel,
pub fn into_write_plan(self) -> Result<ReadModelWritePlan, ReadModelError>
pub async fn commit<S>(
self,
store: &S,
) -> Result<ReadModelCommitOutcome, ReadModelError>where
S: ReadModelWritePlanStore + ?Sized,
Trait Implementations§
Source§impl Clone for ReadModelWritePlanBuilder
impl Clone for ReadModelWritePlanBuilder
Source§fn clone(&self) -> ReadModelWritePlanBuilder
fn clone(&self) -> ReadModelWritePlanBuilder
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 Debug for ReadModelWritePlanBuilder
impl Debug for ReadModelWritePlanBuilder
Source§impl Default for ReadModelWritePlanBuilder
impl Default for ReadModelWritePlanBuilder
Source§fn default() -> ReadModelWritePlanBuilder
fn default() -> ReadModelWritePlanBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ReadModelWritePlanBuilder
impl RefUnwindSafe for ReadModelWritePlanBuilder
impl Send for ReadModelWritePlanBuilder
impl Sync for ReadModelWritePlanBuilder
impl Unpin for ReadModelWritePlanBuilder
impl UnsafeUnpin for ReadModelWritePlanBuilder
impl UnwindSafe for ReadModelWritePlanBuilder
Blanket Implementations§
Source§impl<T> AggregateBuilder for T
impl<T> AggregateBuilder for T
fn aggregate<A: Aggregate>(self) -> AggregateRepository<Self, A>
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> Queueable for T
impl<T> Queueable for T
Source§fn queued(self) -> QueuedRepository<Self, InMemoryAsyncLockManager>
fn queued(self) -> QueuedRepository<Self, InMemoryAsyncLockManager>
Wrap with the default async lock manager. Pair with
.aggregate::<T>() for per-aggregate serialization over the async
repository surface.Source§fn queued_with<L: AsyncLockManager>(
self,
lock_manager: L,
) -> QueuedRepository<Self, L>
fn queued_with<L: AsyncLockManager>( self, lock_manager: L, ) -> QueuedRepository<Self, L>
Wrap with a custom async lock manager.