pub trait SnapshotStore: Send + Sync {
// Required methods
fn load(&self) -> Result<Option<Vec<u8>>>;
fn save(&self, bytes: &[u8]) -> Result<()>;
}Expand description
Generic opaque-blob snapshot store used by services that persist their
whole state as a single serialized document (DynamoDB tables, SQS queues,
etc.). Unlike the fine-grained crate::s3::S3Store which tracks
individual objects and streams bodies to disk, this trait is designed for
services whose state is small enough to fit in memory and can be written
as one atomic file.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".