pub trait ObjectStoreExt {
// Required methods
fn put_blob<B: EncryptedBlob>(&self, blob: &B) -> Result<VoidCid>;
fn get_blob<B: EncryptedBlob>(&self, cid: &VoidCid) -> Result<B>;
fn get_blob_verified<B: EncryptedBlob>(&self, cid: &VoidCid) -> Result<B>;
fn exists(&self, cid: &VoidCid) -> Result<bool>;
fn remove(&self, cid: &VoidCid) -> Result<()>;
}Expand description
Typed object store API.
All reads and writes go through typed encrypted blobs, enforcing
correct AAD at the encryption boundary. No raw &[u8] in or out.
Required Methods§
Sourcefn put_blob<B: EncryptedBlob>(&self, blob: &B) -> Result<VoidCid>
fn put_blob<B: EncryptedBlob>(&self, blob: &B) -> Result<VoidCid>
Store a typed encrypted blob, returning its CID.
Sourcefn get_blob<B: EncryptedBlob>(&self, cid: &VoidCid) -> Result<B>
fn get_blob<B: EncryptedBlob>(&self, cid: &VoidCid) -> Result<B>
Retrieve a typed encrypted blob by CID.
No CID hash verification — AES-GCM’s auth tag provides integrity when the blob is decrypted.
Sourcefn get_blob_verified<B: EncryptedBlob>(&self, cid: &VoidCid) -> Result<B>
fn get_blob_verified<B: EncryptedBlob>(&self, cid: &VoidCid) -> Result<B>
Retrieve a typed encrypted blob with CID hash verification.
Re-hashes the content and verifies it matches the CID. Use for audit/fsck where CID integrity must be verified independent of decryption.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.