[−][src]Enum cqrs_todo_core::TodoAggregate
An aggregate representing the view of a to-do item.
Variants
Created(TodoData)
A to-do item that has been properly initialized.
Uninitialized
An uninitialized to-do item.
Methods
impl TodoAggregate
[src]
pub fn get_data(&self) -> Option<&TodoData>
[src]
Get the underlying to-do data if the aggregate has been initialized.
Trait Implementations
impl Default for TodoAggregate
[src]
impl Eq for TodoAggregate
[src]
impl PartialEq<TodoAggregate> for TodoAggregate
[src]
fn eq(&self, other: &TodoAggregate) -> bool
[src]
fn ne(&self, other: &TodoAggregate) -> bool
[src]
impl Clone for TodoAggregate
[src]
fn clone(&self) -> TodoAggregate
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for TodoAggregate
[src]
impl Aggregate for TodoAggregate
[src]
fn aggregate_type() -> &'static str where
Self: Sized,
[src]
Self: Sized,
fn apply<E>(&mut self, event: E) where
E: AggregateEvent<Self>,
[src]
E: AggregateEvent<Self>,
Consumes the event, applying its effects to the aggregate.
fn execute<C>(
&self,
command: C
) -> Result<<C as AggregateCommand<Self>>::Events, <C as AggregateCommand<Self>>::Error> where
C: AggregateCommand<Self>,
[src]
&self,
command: C
) -> Result<<C as AggregateCommand<Self>>::Events, <C as AggregateCommand<Self>>::Error> where
C: AggregateCommand<Self>,
Consumes a command, attempting to execute it against the aggregate. If the execution is successful, a sequence of events is generated, which can be applied to the aggregate. Read more
impl AggregateId<TodoAggregate> for TodoId
[src]
impl<'a> AggregateId<TodoAggregate> for TodoIdRef<'a>
[src]
impl AggregateCommand<TodoAggregate> for CreateTodo
[src]
type Error = CommandError
The error type.
type Event = TodoEvent
The type of event that is produced by this command.
type Events = ArrayVec<[Self::Event; 2]>
The type of the sequence of events generated when the command is executed successfully.
fn execute_on(
self,
aggregate: &TodoAggregate
) -> Result<Self::Events, Self::Error>
[src]
self,
aggregate: &TodoAggregate
) -> Result<Self::Events, Self::Error>
impl AggregateCommand<TodoAggregate> for UpdateDescription
[src]
type Error = CommandError
The error type.
type Event = TodoEvent
The type of event that is produced by this command.
type Events = ArrayVec<[Self::Event; 1]>
The type of the sequence of events generated when the command is executed successfully.
fn execute_on(
self,
aggregate: &TodoAggregate
) -> Result<Self::Events, Self::Error>
[src]
self,
aggregate: &TodoAggregate
) -> Result<Self::Events, Self::Error>
impl AggregateCommand<TodoAggregate> for SetReminder
[src]
type Error = CommandError
The error type.
type Event = TodoEvent
The type of event that is produced by this command.
type Events = ArrayVec<[Self::Event; 1]>
The type of the sequence of events generated when the command is executed successfully.
fn execute_on(
self,
aggregate: &TodoAggregate
) -> Result<Self::Events, Self::Error>
[src]
self,
aggregate: &TodoAggregate
) -> Result<Self::Events, Self::Error>
impl AggregateCommand<TodoAggregate> for CancelReminder
[src]
type Error = CommandError
The error type.
type Event = TodoEvent
The type of event that is produced by this command.
type Events = ArrayVec<[Self::Event; 1]>
The type of the sequence of events generated when the command is executed successfully.
fn execute_on(
self,
aggregate: &TodoAggregate
) -> Result<Self::Events, Self::Error>
[src]
self,
aggregate: &TodoAggregate
) -> Result<Self::Events, Self::Error>
impl AggregateCommand<TodoAggregate> for ToggleCompletion
[src]
type Error = CommandError
The error type.
type Event = TodoEvent
The type of event that is produced by this command.
type Events = ArrayVec<[Self::Event; 1]>
The type of the sequence of events generated when the command is executed successfully.
fn execute_on(
self,
aggregate: &TodoAggregate
) -> Result<Self::Events, Self::Error>
[src]
self,
aggregate: &TodoAggregate
) -> Result<Self::Events, Self::Error>
impl AggregateCommand<TodoAggregate> for MarkCompleted
[src]
type Error = CommandError
The error type.
type Event = TodoEvent
The type of event that is produced by this command.
type Events = ArrayVec<[Self::Event; 1]>
The type of the sequence of events generated when the command is executed successfully.
fn execute_on(
self,
aggregate: &TodoAggregate
) -> Result<Self::Events, Self::Error>
[src]
self,
aggregate: &TodoAggregate
) -> Result<Self::Events, Self::Error>
impl AggregateCommand<TodoAggregate> for ResetCompleted
[src]
type Error = CommandError
The error type.
type Event = TodoEvent
The type of event that is produced by this command.
type Events = ArrayVec<[Self::Event; 1]>
The type of the sequence of events generated when the command is executed successfully.
fn execute_on(
self,
aggregate: &TodoAggregate
) -> Result<Self::Events, Self::Error>
[src]
self,
aggregate: &TodoAggregate
) -> Result<Self::Events, Self::Error>
impl AggregateEvent<TodoAggregate> for Created
[src]
fn apply_to(self, aggregate: &mut TodoAggregate)
[src]
impl AggregateEvent<TodoAggregate> for DescriptionUpdated
[src]
fn apply_to(self, aggregate: &mut TodoAggregate)
[src]
impl AggregateEvent<TodoAggregate> for ReminderUpdated
[src]
fn apply_to(self, aggregate: &mut TodoAggregate)
[src]
impl AggregateEvent<TodoAggregate> for Completed
[src]
fn apply_to(self, aggregate: &mut TodoAggregate)
[src]
impl AggregateEvent<TodoAggregate> for Uncompleted
[src]
fn apply_to(self, aggregate: &mut TodoAggregate)
[src]
impl AggregateEvent<TodoAggregate> for TodoEvent
[src]
fn apply_to(self, aggregate: &mut TodoAggregate)
[src]
impl Serialize for TodoAggregate
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for TodoAggregate
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl Send for TodoAggregate
impl Sync for TodoAggregate
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,