pub struct Package { /* private fields */ }Expand description
Details of a package / crate
Implementations§
Source§impl Package
impl Package
Sourcepub fn from_current_dir(path: impl Into<PathBuf>) -> Result<Self, Error>
pub fn from_current_dir(path: impl Into<PathBuf>) -> Result<Self, Error>
Get a package from a path with a Cargo.toml file
Sourcepub fn resolve(&mut self)
pub fn resolve(&mut self)
Resolve all the optional dependencies and enabled features of a package. This is done recursively and only needed on the top level package.
Sourcepub fn dependencies_iter(&self) -> impl Iterator<Item = &Dependency>
pub fn dependencies_iter(&self) -> impl Iterator<Item = &Dependency>
Get an iter for all the dependencies of a package. This is both normal dependencies and build dependencies.
Sourcepub fn dependencies_iter_mut(&mut self) -> impl Iterator<Item = &mut Dependency>
pub fn dependencies_iter_mut(&mut self) -> impl Iterator<Item = &mut Dependency>
Get a mutable iter for all the dependencies of a package. This is both normal dependencies and build dependencies.
Trait Implementations§
impl StructuralPartialEq for Package
Auto Trait Implementations§
impl Freeze for Package
impl !RefUnwindSafe for Package
impl !Send for Package
impl !Sync for Package
impl Unpin for Package
impl !UnwindSafe for Package
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