[−][src]Struct libcvss::v3::CVSS3Vector
A CVSS V3.0 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 CVSS3Vector
[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.0 specification, particularly regarding floating-point roundup.
Trait Implementations
impl Clone for CVSS3Vector
[src]
fn clone(&self) -> CVSS3Vector
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for CVSS3Vector
[src]
impl PartialEq<CVSS3Vector> for CVSS3Vector
[src]
fn eq(&self, other: &CVSS3Vector) -> bool
[src]
fn ne(&self, other: &CVSS3Vector) -> bool
[src]
impl Debug for CVSS3Vector
[src]
impl Display for CVSS3Vector
[src]
impl StructuralPartialEq for CVSS3Vector
[src]
impl Serialize for CVSS3Vector
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for CVSS3Vector
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl Send for CVSS3Vector
impl Sync for CVSS3Vector
impl Unpin for CVSS3Vector
impl UnwindSafe for CVSS3Vector
impl RefUnwindSafe for CVSS3Vector
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
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 = !
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,