pub struct CqrsHandles<A>where
A: AggregateRoot,
A::Command: Command<AggregateId = <A as AggregateRoot>::Id>,
A::Event: DomainEvent,{ /* private fields */ }Expand description
Strongly-typed handles into a materialized CQRS instance.
Implementations§
Source§impl<A> CqrsHandles<A>where
A: AggregateRoot,
A::Command: Command<AggregateId = <A as AggregateRoot>::Id>,
A::Event: DomainEvent,
impl<A> CqrsHandles<A>where
A: AggregateRoot,
A::Command: Command<AggregateId = <A as AggregateRoot>::Id>,
A::Event: DomainEvent,
Sourcepub fn repository(&self) -> Arc<dyn Repository<Aggregate = A>> ⓘ
pub fn repository(&self) -> Arc<dyn Repository<Aggregate = A>> ⓘ
Type-erased repository handle.
Sourcepub async fn rebuild_projection(&self, name: &str) -> Result<(), String>
pub async fn rebuild_projection(&self, name: &str) -> Result<(), String>
Reset and replay the projection associated with the named
reader. Returns Err if no reader by that name was registered
at build time, or if no atomr_persistence_query::ReadJournal
is configured (live-tail-only readers can’t be rebuilt — they
have no journal to scan).
Auto Trait Implementations§
impl<A> Freeze for CqrsHandles<A>
impl<A> !RefUnwindSafe for CqrsHandles<A>
impl<A> Send for CqrsHandles<A>
impl<A> Sync for CqrsHandles<A>
impl<A> Unpin for CqrsHandles<A>
impl<A> UnsafeUnpin for CqrsHandles<A>
impl<A> !UnwindSafe for CqrsHandles<A>
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