Trait buildsrs_database::Metadata
source · 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.