[−][src]Struct eventually_postgres::EventStore
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]
Id: ToString + Eq + Send + Sync,
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]
fn clone(&self) -> EventStore<Id, Event>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[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]
Id: ToString + Eq + Send + Sync,
Event: Serialize + Send + Sync,
Event: Deserialize<'de>,
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.
fn append(
&mut self,
id: Self::SourceId,
events: Vec<Self::Event>
) -> BoxFuture<Result<(), Self::Error>>
[src]
&mut self,
id: Self::SourceId,
events: Vec<Self::Event>
) -> BoxFuture<Result<(), Self::Error>>
fn stream(
&self,
id: Self::SourceId,
from: Self::Offset
) -> BoxFuture<Result<EventStream<Self>, Self::Error>>
[src]
&self,
id: Self::SourceId,
from: Self::Offset
) -> BoxFuture<Result<EventStream<Self>, Self::Error>>
fn remove(&mut self, id: Self::SourceId) -> BoxFuture<Result<(), Self::Error>>
[src]
Auto Trait Implementations
impl<Id, Event> !RefUnwindSafe for EventStore<Id, Event>
impl<Id, Event> Send for EventStore<Id, Event> where
Event: Send,
Id: Send,
Event: Send,
Id: Send,
impl<Id, Event> Sync for EventStore<Id, Event> where
Event: Sync,
Id: Sync,
Event: Sync,
Id: Sync,
impl<Id, Event> Unpin for EventStore<Id, Event> where
Event: Unpin,
Id: Unpin,
Event: Unpin,
Id: Unpin,
impl<Id, Event> !UnwindSafe for EventStore<Id, Event>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,