[][src]Enum cqrs_todo_core::TodoAggregate

pub enum TodoAggregate {
    Created(TodoData),
    Uninitialized,
}

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 Eq for TodoAggregate[src]

impl Default for TodoAggregate[src]

impl PartialEq<TodoAggregate> for TodoAggregate[src]

impl Clone for 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 apply<E>(&mut self, event: E) where
    E: AggregateEvent<Self>, 
[src]

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]

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.

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.

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.

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.

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.

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.

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.

impl AggregateEvent<TodoAggregate> for Created[src]

impl AggregateEvent<TodoAggregate> for DescriptionUpdated[src]

impl AggregateEvent<TodoAggregate> for ReminderUpdated[src]

impl AggregateEvent<TodoAggregate> for Completed[src]

impl AggregateEvent<TodoAggregate> for Uncompleted[src]

impl AggregateEvent<TodoAggregate> for TodoEvent[src]

impl Serialize for TodoAggregate[src]

impl<'de> Deserialize<'de> for TodoAggregate[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]