pub struct EventStore { /* private fields */ }Expand description
In-memory event store.
Implementations§
Source§impl EventStore
impl EventStore
pub fn new() -> Self
pub fn append(&self, event: SessionEvent) -> u64
pub fn all_events(&self) -> Vec<EventEntry>
pub fn events_for_session(&self, session_id: &str) -> Vec<EventEntry>
pub fn project_session(&self, session_id: &str) -> Option<SessionProjection>
pub fn project_all(&self) -> Vec<SessionProjection>
pub fn event_count(&self) -> usize
pub fn replay(&self)
Trait Implementations§
Source§impl Default for EventStore
impl Default for EventStore
Source§fn default() -> EventStore
fn default() -> EventStore
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for EventStore
impl RefUnwindSafe for EventStore
impl Send for EventStore
impl Sync for EventStore
impl Unpin for EventStore
impl UnsafeUnpin for EventStore
impl UnwindSafe for EventStore
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