Struct cargo_utils::LocalManifest
source · pub struct LocalManifest {
pub path: PathBuf,
pub manifest: Manifest,
}Expand description
A Cargo manifest that is available locally.
Fields§
§path: PathBufPath to the manifest
manifest: ManifestManifest contents
Implementations§
source§impl LocalManifest
impl LocalManifest
sourcepub fn find(path: Option<&Path>) -> Result<Self>
pub fn find(path: Option<&Path>) -> Result<Self>
Construct a LocalManifest. If no path is provided, make an educated guess as to which one
the user means.
sourcepub fn try_new(path: &Path) -> Result<Self>
pub fn try_new(path: &Path) -> Result<Self>
Construct the LocalManifest corresponding to the Path provided.
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
sourcepub fn get_workspace_dependency_table_mut(
&mut self
) -> Option<&mut dyn TableLike>
pub fn get_workspace_dependency_table_mut( &mut self ) -> Option<&mut dyn TableLike>
Iterates mutably over the [workspace.dependencies].
sourcepub fn set_package_version(&mut self, version: &Version)
pub fn set_package_version(&mut self, version: &Version)
Override the manifest’s version
sourcepub fn version_is_inherited(&self) -> bool
pub fn version_is_inherited(&self) -> bool
true if the package inherits the workspace version
sourcepub fn get_workspace_version(&self) -> Option<Version>
pub fn get_workspace_version(&self) -> Option<Version>
Get the current workspace version, if any.
sourcepub fn set_workspace_version(&mut self, version: &Version)
pub fn set_workspace_version(&mut self, version: &Version)
Override the workspace’s version.