#[non_exhaustive]pub enum DependencyKind {
Dependency,
DevDependency,
PeerDependency,
OptionalDependency,
OptionalPeerDependency,
}Expand description
The type of a Dependency.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Dependency
Either defined as a regular dependency (in the "dependencies" field of package.json),
or, in some cases (implementation-dependent), as any other kind that is not DependencyKind::DevDependency.
DevDependency
Defined in "devDependencies".
PeerDependency
Defined in "peerDependencies". If known to be defined as optional,
it will be marked as DependencyKind::OptionalPeerDependency instead.
OptionalDependency
Defined in "optionalDependencies".
OptionalPeerDependency
Defined in "peerDependency" and known to be defined as optional.
Implementations§
Trait Implementations§
Source§impl Clone for DependencyKind
impl Clone for DependencyKind
Source§fn clone(&self) -> DependencyKind
fn clone(&self) -> DependencyKind
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DependencyKind
impl Debug for DependencyKind
Source§impl PartialEq for DependencyKind
impl PartialEq for DependencyKind
impl Copy for DependencyKind
impl Eq for DependencyKind
impl StructuralPartialEq for DependencyKind
Auto Trait Implementations§
impl Freeze for DependencyKind
impl RefUnwindSafe for DependencyKind
impl Send for DependencyKind
impl Sync for DependencyKind
impl Unpin for DependencyKind
impl UnwindSafe for DependencyKind
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