pub struct Id { /* private fields */ }Expand description
An identifier for an individual advisory
Implementations§
source§impl Id
impl Id
sourcepub const PLACEHOLDER: &'static str = "RUSTSEC-0000-0000"
pub const PLACEHOLDER: &'static str = "RUSTSEC-0000-0000"
Placeholder advisory name: shouldn’t be used until an ID is assigned
sourcepub fn is_placeholder(&self) -> bool
pub fn is_placeholder(&self) -> bool
Is this advisory ID the RUSTSEC-0000-0000 placeholder ID?
sourcepub fn is_rustsec(&self) -> bool
pub fn is_rustsec(&self) -> bool
Is this advisory ID a RUSTSEC advisory?
sourcepub fn numerical_part(&self) -> Option<u32>
pub fn numerical_part(&self) -> Option<u32>
Get the numerical part of this advisory (if available).
This corresponds to the numbers on the right side of the ID.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Id
impl<'de> Deserialize<'de> for Id
source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
source§impl Ord for Id
impl Ord for Id
source§impl PartialOrd<Id> for Id
impl PartialOrd<Id> for Id
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl Eq for Id
impl StructuralEq for Id
impl StructuralPartialEq for Id
Auto Trait Implementations§
impl RefUnwindSafe for Id
impl Send for Id
impl Sync for Id
impl Unpin for Id
impl UnwindSafe for Id
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.