ManifestProvider

Trait ManifestProvider 

Source
pub trait ManifestProvider {
    // Required methods
    fn looks_familiar(&self, url: &str) -> bool;
    fn resolve(&self, url: &str) -> Result<PathBuf, ManifestProviderError>;
}
Expand description

ManifestProviders are responsible for taking a String and returning a PathBuf. Providers, such as Git, are responsible for accepting the String and cloning the repository, in-order to return the PathBuf.

Required Methods§

Source

fn looks_familiar(&self, url: &str) -> bool

This functions is called to establish if it could potentially be able to resolve the url provided

Source

fn resolve(&self, url: &str) -> Result<PathBuf, ManifestProviderError>

This function is responsible for returning a PathBuf with the directory containing the manifests

Implementors§