pub struct Installer { /* private fields */ }Expand description
Discovers, lists, reads, and installs context from resolved Cargo dependencies.
Implementations§
Source§impl Installer
impl Installer
Sourcepub fn new(root: impl Into<PathBuf>) -> Result<Self>
pub fn new(root: impl Into<PathBuf>) -> Result<Self>
Resolve the project’s Cargo packages and find dependencies with context/ directories.
pub fn root(&self) -> &Path
pub fn context_path(&self) -> &Path
pub fn packages(&self) -> &[ContextPackage]
pub fn find_package(&self, selector: &str) -> Result<Option<ContextPackage>>
pub fn list_context_files( &self, package: &ContextPackage, ) -> Result<Vec<ContextFile>>
pub fn show_context_file( &self, selector: &str, file: &str, ) -> Result<Option<String>>
Sourcepub fn install_package(&self, selector: &str) -> Result<bool>
pub fn install_package(&self, selector: &str) -> Result<bool>
Install one package’s context. Returns false when it does not provide context.
Sourcepub fn install_all(&self) -> Result<Vec<String>>
pub fn install_all(&self) -> Result<Vec<String>>
Install all resolved dependency packages that provide context.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Installer
impl RefUnwindSafe for Installer
impl Send for Installer
impl Sync for Installer
impl Unpin for Installer
impl UnsafeUnpin for Installer
impl UnwindSafe for Installer
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