pub struct EventStore { /* private fields */ }Expand description
Event store backed by sled.
Implementations§
Source§impl EventStore
impl EventStore
Sourcepub fn open(path: &Path) -> Result<Self, EventStoreError>
pub fn open(path: &Path) -> Result<Self, EventStoreError>
Sourcepub fn append(&self, event: &SessionEvent) -> Result<EventId, EventStoreError>
pub fn append(&self, event: &SessionEvent) -> Result<EventId, EventStoreError>
Sourcepub fn get_events(
&self,
session_key: &SessionKey,
) -> Result<Vec<SessionEvent>, EventStoreError>
pub fn get_events( &self, session_key: &SessionKey, ) -> Result<Vec<SessionEvent>, EventStoreError>
Sourcepub fn get_events_since(
&self,
session_key: &SessionKey,
since: DateTime<Utc>,
) -> Result<Vec<SessionEvent>, EventStoreError>
pub fn get_events_since( &self, session_key: &SessionKey, since: DateTime<Utc>, ) -> Result<Vec<SessionEvent>, EventStoreError>
Sourcepub fn get_projection(
&self,
session_key: &SessionKey,
) -> Result<SessionProjection, EventStoreError>
pub fn get_projection( &self, session_key: &SessionKey, ) -> Result<SessionProjection, EventStoreError>
Sourcepub fn list_sessions(&self) -> Result<Vec<SessionKey>, EventStoreError>
pub fn list_sessions(&self) -> Result<Vec<SessionKey>, EventStoreError>
Auto Trait Implementations§
impl Freeze for EventStore
impl !RefUnwindSafe for EventStore
impl Send for EventStore
impl Sync for EventStore
impl Unpin 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