Struct evento_store::PgEngine
source · pub struct PgEngine(/* private fields */);Implementations§
source§impl PgEngine
impl PgEngine
pub fn new(pool: PgPool) -> EventStore<Self>
pub fn new_prefix( pool: PgPool, table_prefix: impl Into<String> ) -> EventStore<Self>
Trait Implementations§
source§impl Engine for PgEngine
impl Engine for PgEngine
fn save<A: Aggregate, I: Into<String>>( &self, id: I, events: Vec<Event>, original_version: i32 ) -> Pin<Box<dyn Future<Output = Result<Vec<Event>, Error>> + Send + '_>>
fn load<A: Aggregate, I: Into<String>>( &self, id: I ) -> Pin<Box<dyn Future<Output = EngineResult<A>> + Send + '_>>
fn read_all<F: Serialize>( &self, first: usize, after: Option<Uuid>, filters: Option<Vec<F>> ) -> Pin<Box<dyn Future<Output = Result<Vec<Event>, Error>> + Send + '_>>
fn get<A: Aggregate, I: Into<String>>( &self, id: I ) -> Pin<Box<dyn Future<Output = Result<Option<Event>, Error>> + Send + '_>>
fn get_last( &self ) -> Pin<Box<dyn Future<Output = Result<Option<Event>, Error>> + Send + '_>>
Auto Trait Implementations§
impl !RefUnwindSafe for PgEngine
impl Send for PgEngine
impl Sync for PgEngine
impl Unpin for PgEngine
impl !UnwindSafe for PgEngine
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