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,
ws: &'s Workspace<'_>,
unstable_features: &'s Features,
) -> impl Iterator<Item = (DepTable, CargoResult<Dependency>)> + 's
pub fn get_dependency_versions<'s>( &'s self, dep_key: &'s str, ws: &'s Workspace<'_>, unstable_features: &'s Features, ) -> impl Iterator<Item = (DepTable, CargoResult<Dependency>)> + 's
Lookup a dependency.
Sourcepub fn insert_into_table(
&mut self,
table_path: &[String],
dep: &Dependency,
gctx: &GlobalContext,
workspace_root: &Path,
unstable_features: &Features,
) -> CargoResult<()>
pub fn insert_into_table( &mut self, table_path: &[String], dep: &Dependency, gctx: &GlobalContext, workspace_root: &Path, unstable_features: &Features, ) -> 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.
Sourcepub fn get_dependency_tables_mut(
&mut self,
) -> impl Iterator<Item = &mut dyn TableLike> + '_
pub fn get_dependency_tables_mut( &mut self, ) -> impl Iterator<Item = &mut dyn TableLike> + '_
Allow mutating depedencies, wherever they live. Copied from cargo-edit.
pub 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 Freeze for LocalManifest
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§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>,
§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: 224 bytes