Expand description
This crate provides the object storage abstraction that allows to get, put and remove binary blobs. The following implementations are available:
- File-backed store saving blobs as separate files in the local filesystem
- GCS-based store
- Mock in-memory store
Normally, these implementations are not used directly. Instead, a store trait object (Arc<dyn ObjectStore>
)
can be constructed using an ObjectStoreFactory
based on the configuration.
This trait object is what should be used for dependency injection.
Besides the lower-level storage abstraction, the crate provides high-level
typesafe <dyn ObjectStore>::get()
and <dyn ObjectStore>::put()
methods
to store (de)serializable objects. Prefer using these methods
whenever possible.
Re-exports§
pub use bincode;
Macros§
- serialize_
using_ bincode - Derives
StoredObject::serialize()
andStoredObject::deserialize()
using thebincode
(de)serializer. Should be used inimpl StoredObject
blocks.
Structs§
- File
Backed Object Store ObjectStore
implementation storing objects as files in a local filesystem. Mostly useful for local testing.- Google
Cloud Store ObjectStore
implementation based on GCS.- Mock
Object Store - Mock
ObjectStore
implementation. - Object
Store Factory - Factory of
ObjectStore
s that caches the store instance once it’s created. Used mainly for legacy reasons.
Enums§
- Bucket
- Bucket for
ObjectStore
in which objects can be placed. - Google
Cloud Store Auth Mode - Authentication mode for
GoogleCloudStore
. - Object
Store Error - Errors during
ObjectStore
operations.
Traits§
- Object
Store - Functionality to fetch and store byte blobs from an object store (AWS S3, Google Cloud Storage, Azure Blobstore etc).
- Stored
Object - Object that can be stored in an
ObjectStore
.