pub struct TomlLockfilePackageId {
pub name: String,
pub version: Option<String>,
pub source: Option<TomlLockfileSourceId>,
}
Expand description
Serialization of package IDs.
The version and source are only included when necessary to disambiguate between packages:
- If multiple packages share the same name, the version is included.
- If multiple packages share the same name and version, the source is included.
Fields§
§name: String
§version: Option<String>
§source: Option<TomlLockfileSourceId>
Trait Implementations§
Source§impl Clone for TomlLockfilePackageId
impl Clone for TomlLockfilePackageId
Source§fn clone(&self) -> TomlLockfilePackageId
fn clone(&self) -> TomlLockfilePackageId
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 TomlLockfilePackageId
impl Debug for TomlLockfilePackageId
Source§impl<'de> Deserialize<'de> for TomlLockfilePackageId
impl<'de> Deserialize<'de> for TomlLockfilePackageId
Source§fn deserialize<D>(d: D) -> Result<TomlLockfilePackageId, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(d: D) -> Result<TomlLockfilePackageId, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for TomlLockfilePackageId
impl Display for TomlLockfilePackageId
Source§impl FromStr for TomlLockfilePackageId
impl FromStr for TomlLockfilePackageId
Source§impl Hash for TomlLockfilePackageId
impl Hash for TomlLockfilePackageId
Source§impl Ord for TomlLockfilePackageId
impl Ord for TomlLockfilePackageId
Source§fn cmp(&self, other: &TomlLockfilePackageId) -> Ordering
fn cmp(&self, other: &TomlLockfilePackageId) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for TomlLockfilePackageId
impl PartialEq for TomlLockfilePackageId
Source§impl PartialOrd for TomlLockfilePackageId
impl PartialOrd for TomlLockfilePackageId
Source§impl Serialize for TomlLockfilePackageId
impl Serialize for TomlLockfilePackageId
impl Eq for TomlLockfilePackageId
impl StructuralPartialEq for TomlLockfilePackageId
Auto Trait Implementations§
impl Freeze for TomlLockfilePackageId
impl RefUnwindSafe for TomlLockfilePackageId
impl Send for TomlLockfilePackageId
impl Sync for TomlLockfilePackageId
impl Unpin for TomlLockfilePackageId
impl UnwindSafe for TomlLockfilePackageId
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§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.Source§impl<T> Serialize for T
impl<T> Serialize for T
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>
fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 192 bytes