pub struct PostgresSnapshotStore { /* private fields */ }
Implementations§
Trait Implementations§
source§impl Clone for PostgresSnapshotStore
impl Clone for PostgresSnapshotStore
source§fn clone(&self) -> PostgresSnapshotStore
fn clone(&self) -> PostgresSnapshotStore
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for PostgresSnapshotStore
impl Debug for PostgresSnapshotStore
source§impl SnapshotStore for PostgresSnapshotStore
impl SnapshotStore for PostgresSnapshotStore
type Error = Error
source§async fn save<'a, S, StateToBytes, StateToBytesError>(
&'a mut self,
id: Uuid,
seq_no: u64,
state: &'a S,
_metadata: Metadata,
state_to_bytes: &'a StateToBytes
) -> Result<(), Self::Error>where
S: Send + Sync + 'a,
StateToBytes: Fn(&S) -> Result<Bytes, StateToBytesError> + Send + Sync + 'static,
StateToBytesError: StdError + Send + Sync + 'static,
async fn save<'a, S, StateToBytes, StateToBytesError>(
&'a mut self,
id: Uuid,
seq_no: u64,
state: &'a S,
_metadata: Metadata,
state_to_bytes: &'a StateToBytes
) -> Result<(), Self::Error>where
S: Send + Sync + 'a,
StateToBytes: Fn(&S) -> Result<Bytes, StateToBytesError> + Send + Sync + 'static,
StateToBytesError: StdError + Send + Sync + 'static,
Save the given snapshot state for the given entity ID and sequence number.
source§async fn load<'a, S, StateFromBytes, StateFromBytesError>(
&'a self,
id: Uuid,
state_from_bytes: StateFromBytes
) -> Result<Option<Snapshot<S>>, Self::Error>where
S: 'a,
StateFromBytes: Fn(Bytes) -> Result<S, StateFromBytesError> + Copy + Send + Sync + 'static,
StateFromBytesError: StdError + Send + Sync + 'static,
async fn load<'a, S, StateFromBytes, StateFromBytesError>(
&'a self,
id: Uuid,
state_from_bytes: StateFromBytes
) -> Result<Option<Snapshot<S>>, Self::Error>where
S: 'a,
StateFromBytes: Fn(Bytes) -> Result<S, StateFromBytesError> + Copy + Send + Sync + 'static,
StateFromBytesError: StdError + Send + Sync + 'static,
Find and possibly load the Snapshot for the given entity ID.