pub struct Store { /* private fields */ }Implementations§
Source§impl Store
impl Store
pub fn new<E: Engine + 'static>(engine: E) -> Self
pub async fn load<A: Aggregate + Applier>( &self, aggregate_id: impl Into<String>, ) -> Result<Option<(A, u16)>>
pub async fn load_with<A: Aggregate + Applier>( &self, aggregate_id: impl Into<String>, first: u16, ) -> Result<Option<(A, u16)>>
pub async fn write<A: Aggregate>( &self, aggregate_id: impl Into<String>, event: WriteEvent, original_version: u16, ) -> Result<Event>
pub async fn write_all<A: Aggregate>( &self, aggregate_id: impl Into<String>, events: Vec<WriteEvent>, original_version: u16, ) -> Result<Vec<Event>>
pub async fn insert(&self, events: Vec<Event>) -> Result<()>
pub async fn read( &self, first: u16, after: Option<CursorType>, filters: Option<Vec<Value>>, ) -> Result<QueryResult<Event>>
pub async fn read_of<A: Aggregate>( &self, aggregate_id: impl Into<String>, first: u16, after: Option<CursorType>, ) -> Result<QueryResult<Event>>
pub async fn first_of<A: Aggregate>( &self, aggregate_id: impl Into<String>, ) -> Result<Option<Event>>
pub async fn last(&self) -> Result<Option<Event>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Store
impl !RefUnwindSafe for Store
impl Send for Store
impl Sync for Store
impl Unpin for Store
impl !UnwindSafe for Store
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