pub enum Manifest {
Cargo(CargoManifest),
}Expand description
The package manifest.
Variants§
Cargo(CargoManifest)
A cargo package manifest.
Implementations§
Source§impl Manifest
impl Manifest
pub fn try_as_cargo(self) -> Option<CargoManifest>
pub const fn try_as_cargo_ref(&self) -> Option<&CargoManifest>
pub fn try_as_cargo_mut(&mut self) -> Option<&mut CargoManifest>
Source§impl Manifest
impl Manifest
Sourcepub fn package_kind(&self) -> PackageKind
pub fn package_kind(&self) -> PackageKind
Gets the package kind.
Sourcepub fn from_bytes(kind: PackageKind, bytes: &[u8]) -> Result<Self, Error>
pub fn from_bytes(kind: PackageKind, bytes: &[u8]) -> Result<Self, Error>
Creates a manifest from the given bytes.
Source§impl Manifest
impl Manifest
Sourcepub fn get_dependency(&self, name: impl AsRef<str>) -> Option<DependencyRef<'_>>
pub fn get_dependency(&self, name: impl AsRef<str>) -> Option<DependencyRef<'_>>
Gets the dependency with the given name.
Sourcepub fn get_dependency_mut(
&mut self,
name: impl AsRef<str>,
) -> Option<DependencyMut<'_>>
pub fn get_dependency_mut( &mut self, name: impl AsRef<str>, ) -> Option<DependencyMut<'_>>
Gets the mutable dependency with the given name.
Sourcepub fn dependencies(&self) -> Dependencies<'_>
pub fn dependencies(&self) -> Dependencies<'_>
Gets the dependencies.
Sourcepub fn dependencies_mut(&mut self) -> DependenciesMut<'_>
pub fn dependencies_mut(&mut self) -> DependenciesMut<'_>
Gets the mutable dependencies.
Source§impl Manifest
impl Manifest
Sourcepub fn get_dev_dependency(
&self,
name: impl AsRef<str>,
) -> Option<DependencyRef<'_>>
pub fn get_dev_dependency( &self, name: impl AsRef<str>, ) -> Option<DependencyRef<'_>>
Gets the dev dependency with the given name.
Sourcepub fn get_dev_dependency_mut(
&mut self,
name: impl AsRef<str>,
) -> Option<DependencyMut<'_>>
pub fn get_dev_dependency_mut( &mut self, name: impl AsRef<str>, ) -> Option<DependencyMut<'_>>
Gets the mutable dev dependency with the given name.
Sourcepub fn dev_dependencies(&self) -> Dependencies<'_>
pub fn dev_dependencies(&self) -> Dependencies<'_>
Gets the dev dependencies.
Sourcepub fn dev_dependencies_mut(&mut self) -> DependenciesMut<'_>
pub fn dev_dependencies_mut(&mut self) -> DependenciesMut<'_>
Gets the mutable dev dependencies.
Source§impl Manifest
impl Manifest
Sourcepub fn get_build_dependency(
&self,
name: impl AsRef<str>,
) -> Option<DependencyRef<'_>>
pub fn get_build_dependency( &self, name: impl AsRef<str>, ) -> Option<DependencyRef<'_>>
Gets the build dependency with the given name.
Sourcepub fn get_build_dependency_mut(
&mut self,
name: impl AsRef<str>,
) -> Option<DependencyMut<'_>>
pub fn get_build_dependency_mut( &mut self, name: impl AsRef<str>, ) -> Option<DependencyMut<'_>>
Gets the mutable build dependency with the given name.
Sourcepub fn build_dependencies(&self) -> Dependencies<'_>
pub fn build_dependencies(&self) -> Dependencies<'_>
Gets the build dependencies.
Sourcepub fn build_dependencies_mut(&mut self) -> DependenciesMut<'_>
pub fn build_dependencies_mut(&mut self) -> DependenciesMut<'_>
Gets the mutable build dependencies.
Trait Implementations§
impl Eq for Manifest
impl StructuralPartialEq for Manifest
Auto Trait Implementations§
impl Freeze for Manifest
impl RefUnwindSafe for Manifest
impl Send for Manifest
impl Sync for Manifest
impl Unpin for Manifest
impl UnsafeUnpin 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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
fn equivalent(&self, key: &K) -> bool
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<T> ErasedDestructor for Twhere
T: 'static,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<Q> ToOwnedEquivalent<<Q as ToOwned>::Owned> for Q
impl<Q> ToOwnedEquivalent<<Q as ToOwned>::Owned> for Q
fn to_owned_equivalent(&self) -> <Q as ToOwned>::Owned
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.