pub trait Metadata: Send + Sync + Debug {
    // Required methods
    fn read<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<Box<dyn ReadHandle>, BoxError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn write<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<Box<dyn WriteHandle>, BoxError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Metadata trait.

This trait represents a service that stores metadata in a consistent view. The semantics of this store are transactional, meaning that in-progress writes should not be visible unless they are committed. There are also some important constraints of preventing race conditions when publishing packages.

There may be a limited number of connections to the metadata service, in which case the calls used for creating new handles may be blocking unless other handles are released.

Required Methods§

source

fn read<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Box<dyn ReadHandle>, BoxError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get a read handle to use for reading.

source

fn write<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Box<dyn WriteHandle>, BoxError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get a write handle to use for writing.

Implementors§