Use pkg_fmt from fetcher

This commit is contained in:
Félix Saparelli 2022-02-16 00:19:59 +13:00
parent a12e934940
commit 99e5de0025
4 changed files with 17 additions and 4 deletions

View file

@ -3,7 +3,7 @@ use std::path::Path;
pub use gh_release::*;
pub use quickinstall::*;
use crate::PkgMeta;
use crate::{PkgFmt, PkgMeta};
mod gh_release;
mod quickinstall;
@ -20,6 +20,9 @@ pub trait Fetcher {
/// Check if a package is available for download
async fn check(&self) -> Result<bool, anyhow::Error>;
/// Return the package format
fn pkg_fmt(&self) -> PkgFmt;
}
/// Data required to fetch a package