pub struct Library { /* private fields */ }Implementations§
Source§impl Library
impl Library
Sourcepub fn new<P: AsRef<Path>>(
install_path: P,
target: &str,
callback: Rc<RefCell<dyn Callback>>,
) -> Result<Self, Error>
pub fn new<P: AsRef<Path>>( install_path: P, target: &str, callback: Rc<RefCell<dyn Callback>>, ) -> Result<Self, Error>
Create standard network-based package library from existing configuration on install_path
Sourcepub fn new_local<P: AsRef<Path>>(
source_dir: P,
pubkey_dir: P,
install_path: P,
target: &str,
callback: Rc<RefCell<dyn Callback>>,
) -> Result<Self, Error>
pub fn new_local<P: AsRef<Path>>( source_dir: P, pubkey_dir: P, install_path: P, target: &str, callback: Rc<RefCell<dyn Callback>>, ) -> Result<Self, Error>
Create local-based package library from provided local on install_path
Sourcepub fn new_remote<P: AsRef<Path>>(
remote_urls: &Vec<&str>,
install_path: P,
target: &str,
callback: Rc<RefCell<dyn Callback>>,
) -> Result<Self, Error>
pub fn new_remote<P: AsRef<Path>>( remote_urls: &Vec<&str>, install_path: P, target: &str, callback: Rc<RefCell<dyn Callback>>, ) -> Result<Self, Error>
Create remote-based package library from provided list of remote_urls
pub fn get_installed_packages(&self) -> Result<Vec<PackageName>, Error>
pub fn install(&mut self, packages: Vec<PackageName>) -> Result<(), Error>
pub fn uninstall(&mut self, packages: Vec<PackageName>) -> Result<(), Error>
Sourcepub fn update(&mut self, packages: Vec<PackageName>) -> Result<(), Error>
pub fn update(&mut self, packages: Vec<PackageName>) -> Result<(), Error>
if packages is empty then update all installed packages
pub fn get_all_package_names(&mut self) -> Result<Vec<PackageName>, Error>
pub fn search( &mut self, package: &str, ) -> Result<Vec<(PackageName, f64)>, Error>
pub fn abort(&mut self) -> Result<usize, Error>
pub fn apply(&mut self) -> Result<usize, Error>
pub fn info(&mut self, package: PackageName) -> Result<PackageInfo, Error>
Auto Trait Implementations§
impl Freeze for Library
impl !RefUnwindSafe for Library
impl !Send for Library
impl !Sync for Library
impl Unpin for Library
impl UnsafeUnpin for Library
impl !UnwindSafe for Library
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more