[][src]Struct eventually_postgres::EventStore

pub struct EventStore<Id, Event> { /* fields omitted */ }

EventStore implementation using a PostgreSQL backend.

This implementation uses tokio-postgres crate to interface with Postgres.

Check out EventStoreBuilder for examples to how initialize new instances of this type.

Implementations

impl<Id, Event> EventStore<Id, Event> where
    Id: ToString + Eq + Send + Sync
[src]

pub async fn create_stream<'_>(&'_ self) -> Result<(), Error>[src]

Creates a new table in the database for the provided Stream name during initialization.

Check out EventStoreBuilder for more information.

Trait Implementations

impl<Id: Clone, Event: Clone> Clone for EventStore<Id, Event>[src]

impl<Id: Debug, Event: Debug> Debug for EventStore<Id, Event>[src]

impl<Id, Event> EventStore for EventStore<Id, Versioned<Event>> where
    Id: ToString + Eq + Send + Sync,
    Event: Serialize + Send + Sync,
    Event: Deserialize<'de>, 
[src]

type SourceId = Id

Type of the Source id, typically an [AggregateId]. Read more

type Offset = usize

Offset type for getting a slice of the [Event]s in the Store. Read more

type Event = Versioned<Event>

Event to be stored in the EventStore, typically an [Aggregate::Event]. Read more

type Error = Error

Possible errors returned by the EventStore when requesting operations.

Auto Trait Implementations

impl<Id, Event> !RefUnwindSafe for EventStore<Id, Event>

impl<Id, Event> Send for EventStore<Id, Event> where
    Event: Send,
    Id: Send

impl<Id, Event> Sync for EventStore<Id, Event> where
    Event: Sync,
    Id: Sync

impl<Id, Event> Unpin for EventStore<Id, Event> where
    Event: Unpin,
    Id: Unpin

impl<Id, Event> !UnwindSafe for EventStore<Id, Event>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,