pub struct LocalManifest {
pub path: PathBuf,
pub manifest: Manifest,
}
Expand description
An editable Cargo manifest that is available locally.
Fields§
§path: PathBuf
Path to the manifest.
manifest: Manifest
Manifest contents.
Implementations§
source§impl LocalManifest
impl LocalManifest
sourcepub fn try_new(path: &Path) -> CargoResult<Self>
pub fn try_new(path: &Path) -> CargoResult<Self>
Construct the LocalManifest
corresponding to the Path
provided..
sourcepub fn write(&self) -> CargoResult<()>
pub fn write(&self) -> CargoResult<()>
Write changes back to the file.
sourcepub fn get_dependency_versions<'s>(
&'s self,
dep_key: &'s str
) -> impl Iterator<Item = (DepTable, CargoResult<Dependency>)> + 's
pub fn get_dependency_versions<'s>( &'s self, dep_key: &'s str ) -> impl Iterator<Item = (DepTable, CargoResult<Dependency>)> + 's
Lookup a dependency.
sourcepub fn insert_into_table(
&mut self,
table_path: &[String],
dep: &Dependency
) -> CargoResult<()>
pub fn insert_into_table( &mut self, table_path: &[String], dep: &Dependency ) -> CargoResult<()>
Add entry to a Cargo.toml.
sourcepub fn remove_from_table(
&mut self,
table_path: &[String],
name: &str
) -> CargoResult<()>
pub fn remove_from_table( &mut self, table_path: &[String], name: &str ) -> CargoResult<()>
Remove entry from a Cargo.toml.
fn is_explicit_dep_activation(&self, dep_key: &str) -> bool
fn dep_status(&self, dep_key: &str) -> DependencyStatus
Methods from Deref<Target = Manifest>§
sourcepub fn package_name(&self) -> CargoResult<&str>
pub fn package_name(&self) -> CargoResult<&str>
Get the manifest’s package name.
sourcepub fn get_table<'a>(&'a self, table_path: &[String]) -> CargoResult<&'a Item>
pub fn get_table<'a>(&'a self, table_path: &[String]) -> CargoResult<&'a Item>
Get the specified table from the manifest.
sourcepub fn get_table_mut<'a>(
&'a mut self,
table_path: &[String]
) -> CargoResult<&'a mut Item>
pub fn get_table_mut<'a>( &'a mut self, table_path: &[String] ) -> CargoResult<&'a mut Item>
Get the specified table from the manifest.
sourcepub fn get_sections(&self) -> Vec<(DepTable, Item)>
pub fn get_sections(&self) -> Vec<(DepTable, Item)>
Get all sections in the manifest that exist and might contain
dependencies. The returned items are always Table
or
InlineTable
.
pub fn get_legacy_sections(&self) -> Vec<String>
Trait Implementations§
source§impl Clone for LocalManifest
impl Clone for LocalManifest
source§fn clone(&self) -> LocalManifest
fn clone(&self) -> LocalManifest
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for LocalManifest
impl Debug for LocalManifest
source§impl Deref for LocalManifest
impl Deref for LocalManifest
source§impl DerefMut for LocalManifest
impl DerefMut for LocalManifest
Auto Trait Implementations§
impl RefUnwindSafe for LocalManifest
impl Send for LocalManifest
impl Sync for LocalManifest
impl Unpin for LocalManifest
impl UnwindSafe for LocalManifest
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,
source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 304 bytes