Struct cargo_workspace2::models::CargoCrate [−][src]
Initial representation of a crate, before being parsed
Fields
doc: Document
path: PathBuf
dependencies: Vec<Dependency>
Implementations
impl CargoCrate
[src]
pub fn name(&self) -> String
[src]
Get the crate name from the inner document
pub fn version(&self) -> String
[src]
Get the current version
pub fn dep_by_name(&self, name: &String) -> &Dependency
[src]
Find a cargo dependency by name
pub fn change_dep(&mut self, dep: &String, ver: &String)
[src]
pub fn all_deps_mut(&mut self) -> Vec<&mut Dependency>
[src]
pub fn has_version(&self, name: &String) -> bool
[src]
Check if this crate depends on a specific version of another
pub fn has_path(&self, name: &String) -> bool
[src]
Check if this crate depends on a specific path of another
pub fn set_version(&mut self, version: String)
[src]
Set a new version for this crate
pub fn sync(&mut self)
[src]
Sync any changes made to the document to disk
Trait Implementations
impl Clone for CargoCrate
[src]
fn clone(&self) -> CargoCrate
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for CargoCrate
[src]
Auto Trait Implementations
impl RefUnwindSafe for CargoCrate
[src]
impl Send for CargoCrate
[src]
impl Sync for CargoCrate
[src]
impl Unpin for CargoCrate
[src]
impl UnwindSafe for CargoCrate
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,