Skip to main content

ImmutableBlobStore

Trait ImmutableBlobStore 

Source
pub trait ImmutableBlobStore:
    Send
    + Sync
    + Debug {
    // Required methods
    fn kind(&self) -> &'static str;
    fn max_blob_size(&self) -> usize;
    fn create<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        key: &'life1 str,
        value: &'life2 [u8],
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn get<'life0, 'life1, 'async_trait>(
        &'life0 self,
        key: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;

    // Provided method
    fn exists<'life0, 'life1, 'async_trait>(
        &'life0 self,
        key: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
}
Expand description

Immutable remote objects. Implementations must never overwrite a key and must bound request duration and returned blob sizes. Streaming transports should also bound downloaded bodies; SDK-backed implementations must document any reliance on service response limits before decoding. Debug/errors must redact credentials and payloads. A false create result means an existing object, not an authentication, transport or ambiguous-commit failure.

Required Methods§

Source

fn kind(&self) -> &'static str

Stable, non-secret provider identifier used to isolate manifest paths.

Source

fn max_blob_size(&self) -> usize

Maximum encoded blob size, including the certificate wire envelope.

Source

fn create<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, key: &'life1 str, value: &'life2 [u8], ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Create only when absent; return false if already present.

Source

fn get<'life0, 'life1, 'async_trait>( &'life0 self, key: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Read an immutable object; only confirmed absence returns None.

Provided Methods§

Source

fn exists<'life0, 'life1, 'async_trait>( &'life0 self, key: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Check object presence. The default uses the same bounded read path.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§