[−][src]Struct cqrs::memory::EventStore
An in-memory event store
Methods
impl<A, E, M, Hasher> EventStore<A, E, M, Hasher> where
A: Aggregate,
E: AggregateEvent<A> + Clone,
Hasher: BuildHasher,
[src]
A: Aggregate,
E: AggregateEvent<A> + Clone,
Hasher: BuildHasher,
pub fn with_hasher(hasher: Hasher) -> Self
[src]
Constructs a new event store with the specified hasher.
Trait Implementations
impl<A, E, M, Hasher> Default for EventStore<A, E, M, Hasher> where
A: Aggregate,
E: AggregateEvent<A> + Clone,
Hasher: BuildHasher + Default,
[src]
A: Aggregate,
E: AggregateEvent<A> + Clone,
Hasher: BuildHasher + Default,
impl<A: Debug, E: Debug, M: Debug, Hasher: Debug> Debug for EventStore<A, E, M, Hasher> where
A: Aggregate,
E: AggregateEvent<A> + Clone,
Hasher: BuildHasher,
[src]
A: Aggregate,
E: AggregateEvent<A> + Clone,
Hasher: BuildHasher,
impl<A, E, M, Hasher> EventSource<A, E> for EventStore<A, E, M, Hasher> where
A: Aggregate,
E: AggregateEvent<A> + Clone,
Hasher: BuildHasher,
[src]
A: Aggregate,
E: AggregateEvent<A> + Clone,
Hasher: BuildHasher,
type Error = Void
The error type.
type Events = Vec<VersionedEvent<E>>
Represents the sequence of events read from the event source.
fn read_events<I>(
&self,
id: &I,
since: Since,
max_count: Option<u64>
) -> Result<Option<Self::Events>, Self::Error> where
I: AggregateId<A>,
[src]
&self,
id: &I,
since: Since,
max_count: Option<u64>
) -> Result<Option<Self::Events>, Self::Error> where
I: AggregateId<A>,
impl<A, E, M, Hasher> EventSink<A, E, M> for EventStore<A, E, M, Hasher> where
A: Aggregate,
E: AggregateEvent<A> + Clone,
Hasher: BuildHasher,
[src]
A: Aggregate,
E: AggregateEvent<A> + Clone,
Hasher: BuildHasher,
type Error = PreconditionFailed
The error type.
fn append_events<I>(
&self,
id: &I,
events: &[E],
precondition: Option<Precondition>,
metadata: M
) -> Result<EventNumber, Self::Error> where
I: AggregateId<A>,
[src]
&self,
id: &I,
events: &[E],
precondition: Option<Precondition>,
metadata: M
) -> Result<EventNumber, Self::Error> where
I: AggregateId<A>,
Auto Trait Implementations
impl<A, E, M, Hasher = RandomState> !Sync for EventStore<A, E, M, Hasher>
impl<A, E, M, Hasher> Unpin for EventStore<A, E, M, Hasher> where
A: Unpin,
E: Unpin,
Hasher: Unpin,
A: Unpin,
E: Unpin,
Hasher: Unpin,
impl<A, E, M, Hasher = RandomState> !Send for EventStore<A, E, M, Hasher>
impl<A, E, M, Hasher> UnwindSafe for EventStore<A, E, M, Hasher> where
A: RefUnwindSafe,
E: UnwindSafe,
Hasher: UnwindSafe,
M: RefUnwindSafe,
A: RefUnwindSafe,
E: UnwindSafe,
Hasher: UnwindSafe,
M: RefUnwindSafe,
impl<A, E, M, Hasher = RandomState> !RefUnwindSafe for EventStore<A, E, M, Hasher>
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,