pub enum NpmDependencySection {
Dependencies,
DevDependencies,
PeerDependencies,
OptionalDependencies,
}Expand description
Section in package.json where a dependency is declared.
npm supports multiple dependency sections:
dependencies: Production dependenciesdevDependencies: Development-only dependenciespeerDependencies: Peer dependency requirementsoptionalDependencies: Optional dependencies (install failures ignored)
§Examples
use deps_npm::types::NpmDependencySection;
let section = NpmDependencySection::Dependencies;
assert!(matches!(section, NpmDependencySection::Dependencies));Variants§
Dependencies
Production dependencies (dependencies)
DevDependencies
Development dependencies (devDependencies)
PeerDependencies
Peer dependencies (peerDependencies)
OptionalDependencies
Optional dependencies (optionalDependencies)
Trait Implementations§
Source§impl Clone for NpmDependencySection
impl Clone for NpmDependencySection
Source§fn clone(&self) -> NpmDependencySection
fn clone(&self) -> NpmDependencySection
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 NpmDependencySection
impl Debug for NpmDependencySection
Source§impl PartialEq for NpmDependencySection
impl PartialEq for NpmDependencySection
impl Copy for NpmDependencySection
impl Eq for NpmDependencySection
impl StructuralPartialEq for NpmDependencySection
Auto Trait Implementations§
impl Freeze for NpmDependencySection
impl RefUnwindSafe for NpmDependencySection
impl Send for NpmDependencySection
impl Sync for NpmDependencySection
impl Unpin for NpmDependencySection
impl UnwindSafe for NpmDependencySection
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.