pub struct Library { /* private fields */ }Implementations§
Source§impl Library
impl Library
pub fn new<P: AsRef<Path>>( install_path: P, target: &str, callback: Rc<RefCell<dyn Callback>>, ) -> Result<Self, Error>
pub fn get_installed_packages(&self) -> Result<Vec<PackageName>, Error>
pub fn install(&mut self, packages: Vec<PackageName>) -> Result<(), Error>
Sourcepub fn uninstall(&mut self, packages: Vec<PackageName>) -> Result<(), Error>
pub fn uninstall(&mut self, packages: Vec<PackageName>) -> Result<(), Error>
TODO: Cannot uninstall depedencies as manual mark is not implemented
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 apply(&mut self) -> Result<(), Error>
pub fn with_dependecies( &mut self, packages: &Vec<PackageName>, ) -> Result<Vec<PackageName>, 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 !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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more