Skip to main content

BundleStore

Trait BundleStore 

Source
pub trait BundleStore: Send + Sync {
    // Required methods
    fn push<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        name: &'life1 str,
        spec: &'life2 SessionSpec,
        message: Option<&'life3 str>,
    ) -> Pin<Box<dyn Future<Output = Result<BundleVersion, StoreError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
    fn get<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        name: &'life1 str,
        reference: &'life2 BundleRef,
    ) -> Pin<Box<dyn Future<Output = Result<(BundleVersion, SessionSpec), StoreError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn versions<'life0, 'life1, 'async_trait>(
        &'life0 self,
        name: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<BundleVersion>, StoreError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn names<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<String>, StoreError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn set_label<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        name: &'life1 str,
        label: &'life2 str,
        version: &'life3 str,
    ) -> Pin<Box<dyn Future<Output = Result<String, StoreError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
    fn labels<'life0, 'life1, 'async_trait>(
        &'life0 self,
        name: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<BTreeMap<String, String>, StoreError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Versioned, labelled storage for session specs. See the module docs.

Required Methods§

Source

fn push<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, name: &'life1 str, spec: &'life2 SessionSpec, message: Option<&'life3 str>, ) -> Pin<Box<dyn Future<Output = Result<BundleVersion, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Store spec as a version of name. Pushing a spec that is already stored returns the existing version unchanged.

Source

fn get<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, name: &'life1 str, reference: &'life2 BundleRef, ) -> Pin<Box<dyn Future<Output = Result<(BundleVersion, SessionSpec), StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Load a version of name.

Source

fn versions<'life0, 'life1, 'async_trait>( &'life0 self, name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<BundleVersion>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Every version of name, oldest first.

Source

fn names<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Every bundle name, sorted.

Source

fn set_label<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, name: &'life1 str, label: &'life2 str, version: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<String, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Point label of name at version (an id or unique prefix). Returns the full version id.

Source

fn labels<'life0, 'life1, 'async_trait>( &'life0 self, name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<BTreeMap<String, String>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

The labels of name and the versions they point to.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§