[][src]Struct cargo_edit::LocalManifest

pub struct LocalManifest {
    pub path: PathBuf,
    // some fields omitted
}

A Cargo manifest that is available locally.

Fields

path: PathBuf

Path to the manifest

Methods

impl LocalManifest[src]

pub fn find(path: &Option<PathBuf>) -> Result<Self>[src]

Construct a LocalManifest. If no path is provided, make an educated guess as to which one the user means.

pub fn try_new(path: &Path) -> Result<Self>[src]

Construct the LocalManifest corresponding to the Path provided.

pub fn upgrade(
    &mut self,
    dependency: &Dependency,
    dry_run: bool,
    skip_compatible: bool
) -> Result<()>
[src]

Instruct this manifest to upgrade a single dependency. If this manifest does not have that dependency, it does nothing.

Methods from Deref<Target = Manifest>

pub fn get_sections(&self) -> Vec<(Vec<String>, Item)>[src]

Get all sections in the manifest that exist and might contain dependencies. The returned items are always Table or InlineTable.

pub fn write_to_file(&self, file: &mut File) -> Result<()>[src]

Overwrite a file with TOML data.

Trait Implementations

impl Deref for LocalManifest[src]

type Target = Manifest

The resulting type after dereferencing.

impl Debug for LocalManifest[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err