Trait VersionManager

Source
pub trait VersionManager: Send + Sync {
    // Required methods
    fn list_versions<'life0, 'life1, 'async_trait>(
        &'life0 self,
        tool: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = VxResult<Vec<Version>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_latest<'life0, 'life1, 'async_trait>(
        &'life0 self,
        tool: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = VxResult<Version>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn satisfies(&self, version: &Version, constraint: &str) -> bool;
}
Expand description

Core trait for version management

Required Methods§

Source

fn list_versions<'life0, 'life1, 'async_trait>( &'life0 self, tool: &'life1 str, ) -> Pin<Box<dyn Future<Output = VxResult<Vec<Version>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

List available versions for a tool

Source

fn get_latest<'life0, 'life1, 'async_trait>( &'life0 self, tool: &'life1 str, ) -> Pin<Box<dyn Future<Output = VxResult<Version>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get latest version for a tool

Source

fn satisfies(&self, version: &Version, constraint: &str) -> bool

Check if a version satisfies a constraint

Implementors§