pub struct CargoCrate {
pub doc: Document,
pub path: PathBuf,
pub dependencies: Vec<Dependency>,
}Expand description
Initial representation of a crate, before being parsed
Fields§
§doc: Document§path: PathBuf§dependencies: Vec<Dependency>Implementations§
Source§impl CargoCrate
impl CargoCrate
Sourcepub fn dep_by_name(&self, name: &String) -> &Dependency
pub fn dep_by_name(&self, name: &String) -> &Dependency
Find a cargo dependency by name
pub fn change_dep(&mut self, dep: &String, ver: &String)
pub fn all_deps_mut(&mut self) -> Vec<&mut Dependency>
Sourcepub fn has_version(&self, name: &String) -> bool
pub fn has_version(&self, name: &String) -> bool
Check if this crate depends on a specific version of another
Sourcepub fn has_path(&self, name: &String) -> bool
pub fn has_path(&self, name: &String) -> bool
Check if this crate depends on a specific path of another
Sourcepub fn set_version(&mut self, version: String)
pub fn set_version(&mut self, version: String)
Set a new version for this crate
Trait Implementations§
Source§impl Clone for CargoCrate
impl Clone for CargoCrate
Source§fn clone(&self) -> CargoCrate
fn clone(&self) -> CargoCrate
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CargoCrate
impl RefUnwindSafe for CargoCrate
impl Send for CargoCrate
impl Sync for CargoCrate
impl Unpin for CargoCrate
impl UnsafeUnpin for CargoCrate
impl UnwindSafe for CargoCrate
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