pub struct Manifest {
pub manifest_path: AbsolutePath,
pub manifest_data: Option<Document>,
}Expand description
Hold manifest data.
Fields§
§manifest_path: AbsolutePathPath to Cargo.toml
manifest_data: Option<Document>Strict type of Cargo.toml manifest.
Implementations§
Source§impl Manifest
impl Manifest
Sourcepub fn manifest_path(&self) -> &AbsolutePath
pub fn manifest_path(&self) -> &AbsolutePath
Returns path to Cargo.toml.
Sourcepub fn load(&mut self) -> Result<(), ManifestError>
pub fn load(&mut self) -> Result<(), ManifestError>
Load manifest from path.
Sourcepub fn package_is(&self) -> Result<bool, ManifestError>
pub fn package_is(&self) -> Result<bool, ManifestError>
Check that the current manifest is the manifest of the package (can also be a virtual workspace).
Sourcepub fn local_is(&self) -> Result<bool, ManifestError>
pub fn local_is(&self) -> Result<bool, ManifestError>
Check that module is local.
The package is defined as local if the publish field is set to `false’ or the registers are specified.
Trait Implementations§
Source§impl TryFrom<AbsolutePath> for Manifest
impl TryFrom<AbsolutePath> for Manifest
Source§type Error = ManifestError
type Error = ManifestError
The type returned in the event of a conversion error.
Source§fn try_from(
manifest_path: AbsolutePath,
) -> Result<Manifest, <Manifest as TryFrom<AbsolutePath>>::Error>
fn try_from( manifest_path: AbsolutePath, ) -> Result<Manifest, <Manifest as TryFrom<AbsolutePath>>::Error>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for Manifest
impl RefUnwindSafe for Manifest
impl Send for Manifest
impl Sync for Manifest
impl Unpin for Manifest
impl UnwindSafe for Manifest
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<S> SetWithType for S
impl<S> SetWithType for S
Source§fn set_with_type<T, IntoT>(&mut self, component: IntoT)where
IntoT: Into<T>,
S: SetComponent<T, IntoT>,
fn set_with_type<T, IntoT>(&mut self, component: IntoT)where
IntoT: Into<T>,
S: SetComponent<T, IntoT>,
Function to set value of a component by its type.