pub struct PeerDependencyMeta {
pub optional: Option<bool>,
pub extras: BTreeMap<String, Value>,
}Expand description
When a user installs your package, warnings are emitted if packages specified in “peerDependencies” are not already installed. The “peerDependenciesMeta” field serves to provide more information on how your peer dependencies are utilized. Most commonly, it allows peer dependencies to be marked as optional. Metadata for this field is specified with a simple hash of the package name to a metadata object.
Fields§
§optional: Option<bool>Specifies that this peer dependency is optional and should not be installed automatically.
extras: BTreeMap<String, Value>Trait Implementations§
Source§impl Clone for PeerDependencyMeta
impl Clone for PeerDependencyMeta
Source§fn clone(&self) -> PeerDependencyMeta
fn clone(&self) -> PeerDependencyMeta
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 PeerDependencyMeta
impl Debug for PeerDependencyMeta
Source§impl Default for PeerDependencyMeta
impl Default for PeerDependencyMeta
Source§fn default() -> PeerDependencyMeta
fn default() -> PeerDependencyMeta
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PeerDependencyMetawhere
PeerDependencyMeta: Default,
impl<'de> Deserialize<'de> for PeerDependencyMetawhere
PeerDependencyMeta: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for PeerDependencyMeta
impl PartialEq for PeerDependencyMeta
Source§impl Serialize for PeerDependencyMeta
impl Serialize for PeerDependencyMeta
impl Eq for PeerDependencyMeta
impl StructuralPartialEq for PeerDependencyMeta
Auto Trait Implementations§
impl Freeze for PeerDependencyMeta
impl RefUnwindSafe for PeerDependencyMeta
impl Send for PeerDependencyMeta
impl Sync for PeerDependencyMeta
impl Unpin for PeerDependencyMeta
impl UnsafeUnpin for PeerDependencyMeta
impl UnwindSafe for PeerDependencyMeta
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.