pub struct EventStore<Id, Event> where
    Id: Hash + Eq
{ /* private fields */ }
Expand description

An in-memory EventStore implementation, backed by an HashMap.

Implementations

Creates a new EventStore with a specified in-memory broadcast channel size, which will used by the subscribe_all method to notify of newly append events.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Type of the Source id, typically an AggregateId. Read more

Event to be stored in the EventStore, typically an Aggregate::Event. Read more

Possible errors returned by the EventStore when requesting operations.

Appends a new list of Events to the Event Store, for the Source entity specified by SourceId. Read more

Streams a list of Events from the EventStore back to the application, by specifying the desired SourceId and Select operation. Read more

Streams a list of Events from the EventStore back to the application, disregarding the SourceId values but using a Select operation. Read more

Drops all the Events related to one Source, specified by the provided SourceId. Read more

Type of the Source id, typically an AggregateId. Read more

Event type stored in the EventStore, typically an Aggregate::Event. Read more

Possible errors returned when receiving events from the notification channel.

Subscribes to all new events persisted in the EventStore, from the moment of calling this function, in the future. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.