pub enum CveIdError {
Empty,
InvalidPrefix,
InvalidFormat,
InvalidYear,
InvalidSequence,
}Expand description
Error returned when a CVE identifier is invalid.
Variants§
Empty
The identifier is empty after trimming.
InvalidPrefix
The identifier does not start with uppercase CVE.
InvalidFormat
The identifier does not have the expected CVE-YYYY-NNNN shape.
InvalidYear
The year is not exactly four ASCII digits.
InvalidSequence
The sequence is not at least four ASCII digits.
Trait Implementations§
Source§impl Clone for CveIdError
impl Clone for CveIdError
Source§fn clone(&self) -> CveIdError
fn clone(&self) -> CveIdError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CveIdError
impl Debug for CveIdError
Source§impl Display for CveIdError
impl Display for CveIdError
Source§impl Error for CveIdError
impl Error for CveIdError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for CveIdError
impl PartialEq for CveIdError
Source§fn eq(&self, other: &CveIdError) -> bool
fn eq(&self, other: &CveIdError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for CveIdError
impl Eq for CveIdError
impl StructuralPartialEq for CveIdError
Auto Trait Implementations§
impl Freeze for CveIdError
impl RefUnwindSafe for CveIdError
impl Send for CveIdError
impl Sync for CveIdError
impl Unpin for CveIdError
impl UnsafeUnpin for CveIdError
impl UnwindSafe for CveIdError
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