pub struct AggregateRoot<T>where
T: Aggregate + 'static,{ /* private fields */ }
Expand description
An AggregateRoot
represents an handler to the Aggregate
it’s managing,
such as:
- Owning its
State
,Id
and version, - Proxying
Command
s to theAggregate
using the currentState
, - Keeping a list of
Event
s to commit afterCommand
execution.
§Initialize
An AggregateRoot
can only be initialized using the AggregateRootBuilder
.
Check AggregateRootBuilder::build
for more information.
Implementations§
Source§impl<T> AggregateRoot<T>where
T: Aggregate,
impl<T> AggregateRoot<T>where
T: Aggregate,
Source§impl<T> AggregateRoot<T>
impl<T> AggregateRoot<T>
Trait Implementations§
Source§impl<T> Debug for AggregateRoot<T>
impl<T> Debug for AggregateRoot<T>
Source§impl<T> Deref for AggregateRoot<T>where
T: Aggregate,
impl<T> Deref for AggregateRoot<T>where
T: Aggregate,
Source§impl<T> PartialEq for AggregateRoot<T>where
T: Aggregate,
impl<T> PartialEq for AggregateRoot<T>where
T: Aggregate,
Auto Trait Implementations§
impl<T> Freeze for AggregateRoot<T>
impl<T> RefUnwindSafe for AggregateRoot<T>where
<T as Aggregate>::Id: RefUnwindSafe,
<T as Aggregate>::State: RefUnwindSafe,
T: RefUnwindSafe,
<T as Aggregate>::Event: RefUnwindSafe,
impl<T> Send for AggregateRoot<T>
impl<T> Sync for AggregateRoot<T>
impl<T> Unpin for AggregateRoot<T>
impl<T> UnwindSafe for AggregateRoot<T>where
<T as Aggregate>::Id: UnwindSafe,
<T as Aggregate>::State: UnwindSafe,
T: UnwindSafe,
<T as Aggregate>::Event: UnwindSafe,
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