Trait proto::Verifiable

source ·
pub trait Verifiable<'tool>: Send + Sync + Downloadable<'tool> {
    // Required methods
    fn get_checksum_path(&self) -> Result<PathBuf, ProtoError>;
    fn get_checksum_url(&self) -> Result<String, ProtoError>;
    fn verify_checksum<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        checksum_file: &'life1 Path,
        download_file: &'life2 Path
    ) -> Pin<Box<dyn Future<Output = Result<bool, ProtoError>> + Send + 'async_trait, Global>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             Self: 'async_trait;

    // Provided method
    fn download_checksum<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        to_file: &'life1 Path,
        from_url: Option<&'life2 str>
    ) -> Pin<Box<dyn Future<Output = Result<bool, ProtoError>> + Send + 'async_trait, Global>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             Self: 'async_trait { ... }
}

Required Methods§

source

fn get_checksum_path(&self) -> Result<PathBuf, ProtoError>

Return an absolute file path to the checksum file. This may not exist, as the path is composed ahead of time. This is typically ~/.prove/temp/.

source

fn get_checksum_url(&self) -> Result<String, ProtoError>

Return a URL to download the tool’s checksum manifest from a registry.

source

fn verify_checksum<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, checksum_file: &'life1 Path, download_file: &'life2 Path ) -> Pin<Box<dyn Future<Output = Result<bool, ProtoError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

Verify the downloaded file using the checksum strategy for the tool. Common strategies are SHA256 and MD5.

Provided Methods§

source

fn download_checksum<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, to_file: &'life1 Path, from_url: Option<&'life2 str> ) -> Pin<Box<dyn Future<Output = Result<bool, ProtoError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

If applicable, download all files necessary for verifying checksums.

Implementations on Foreign Types§

source§

impl<'impl0> Verifiable<'impl0> for GoLanguage

source§

fn get_checksum_path(&self) -> Result<PathBuf, ProtoError>

source§

fn get_checksum_url(&self) -> Result<String, ProtoError>

source§

fn verify_checksum<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, checksum_file: &'life1 Path, download_file: &'life2 Path ) -> Pin<Box<dyn Future<Output = Result<bool, ProtoError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, GoLanguage: 'async_trait,

source§

impl<'impl0> Verifiable<'impl0> for NodeDependencyManager

source§

fn get_checksum_path(&self) -> Result<PathBuf, ProtoError>

source§

fn get_checksum_url(&self) -> Result<String, ProtoError>

source§

fn download_checksum<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _to_file: &'life1 Path, _from_url: Option<&'life2 str> ) -> Pin<Box<dyn Future<Output = Result<bool, ProtoError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, NodeDependencyManager: 'async_trait,

source§

fn verify_checksum<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _checksum_file: &'life1 Path, _download_file: &'life2 Path ) -> Pin<Box<dyn Future<Output = Result<bool, ProtoError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, NodeDependencyManager: 'async_trait,

source§

impl<'impl0> Verifiable<'impl0> for NodeLanguage

source§

fn get_checksum_path(&self) -> Result<PathBuf, ProtoError>

source§

fn get_checksum_url(&self) -> Result<String, ProtoError>

source§

fn verify_checksum<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, checksum_file: &'life1 Path, download_file: &'life2 Path ) -> Pin<Box<dyn Future<Output = Result<bool, ProtoError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, NodeLanguage: 'async_trait,

Implementors§