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§
Sourcefn is_package_available(&self, name: &str) -> bool
fn is_package_available(&self, name: &str) -> bool
Check if a package is available
Sourcefn install_package(&mut self, name: &str) -> Result<(), PackageError>
fn install_package(&mut self, name: &str) -> Result<(), PackageError>
Try to install a package (may be a no-op in WASM)
Sourcefn get_package_types(&self, name: &str) -> Option<String>
fn get_package_types(&self, name: &str) -> Option<String>
Get package type information (cached)