Skip to main content

PackageChecker

Trait PackageChecker 

Source
pub trait PackageChecker {
    // Required methods
    fn is_package_available(&self, name: &str) -> bool;
    fn install_package(&mut self, name: &str) -> Result<(), PackageError>;
    fn get_package_types(&self, name: &str) -> Option<String>;
}
Expand description

Checks and optionally installs R packages.

In native mode, this can execute R commands. In WASM mode, this can be a no-op or return cached information.

Required Methods§

Source

fn is_package_available(&self, name: &str) -> bool

Check if a package is available

Source

fn install_package(&mut self, name: &str) -> Result<(), PackageError>

Try to install a package (may be a no-op in WASM)

Source

fn get_package_types(&self, name: &str) -> Option<String>

Get package type information (cached)

Implementors§