[−][src]Struct libcvss::v31::CVSS31Vector
A CVSS V3.1 vector.
This structure contains a mandatory base vector, an optional temporal vector and an optional environmental vector.
Fields
base: BaseVector
Mandatory Base vector.
temporal: Option<TemporalVector>
Optional Temporal vector.
environmental: Option<EnvironmentalVector>
Optional Environmental vector.
Methods
impl CVSS31Vector
[src]
pub fn parse_strict(cvss_string: &str) -> Result<Self, Vec<&'static str>> where
Self: Sized,
[src]
Self: Sized,
Attempts to parse a string slice as a CVSS vector, in strict mode.
In strict mode, all fields must be in canonical order as defined by the CVSS specification. They must be present exactly once (for mandatory fields), or zero or one time for optional fields.
If parsing fails a list of of errors will be returned in a human readable format.
pub fn parse_nonstrict(cvss_string: &str) -> Result<Self, Vec<&'static str>> where
Self: Sized,
[src]
Self: Sized,
Attempts to parse a string slice as a CVSS vector, in non-strict mode.
In non-strict mode, the parser will make the best out of the input. Fields do not have to be in the canonical order, and can be repeated (the last occurence of a field will be used). All mandatory fields (per the CVSS specification) still have to be present in the input.
If parsing fails a list of of errors will be returned in a human readable format.
pub fn score(&self) -> f64
[src]
Provides the severity score for the CVSS vector.
This score respects the CVSS 3.1 specification, particularly regarding floating-point roundup.
Trait Implementations
impl Clone for CVSS31Vector
[src]
fn clone(&self) -> CVSS31Vector
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for CVSS31Vector
[src]
impl Debug for CVSS31Vector
[src]
impl<'de> Deserialize<'de> for CVSS31Vector
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Display for CVSS31Vector
[src]
impl PartialEq<CVSS31Vector> for CVSS31Vector
[src]
fn eq(&self, other: &CVSS31Vector) -> bool
[src]
fn ne(&self, other: &CVSS31Vector) -> bool
[src]
impl Serialize for CVSS31Vector
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralPartialEq for CVSS31Vector
[src]
Auto Trait Implementations
impl RefUnwindSafe for CVSS31Vector
impl Send for CVSS31Vector
impl Sync for CVSS31Vector
impl Unpin for CVSS31Vector
impl UnwindSafe for CVSS31Vector
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,