pub struct CvssV3Vector {
pub attack_vector: AttackVector,
pub attack_complexity: AttackComplexity,
pub privileges_required: PrivilegesRequired,
pub user_interaction: UserInteraction,
pub scope: Scope,
pub confidentiality: Impact,
pub integrity: Impact,
pub availability: Impact,
}Expand description
A parsed CVSS v3.x vector string
CVSS v3 vectors follow the format:
AV:[NALP]/AC:[LH]/PR:[NLH]/UI:[NR]/S:[UC]/C:[NLH]/I:[NLH]/A:[NLH]
§Example
use bugcrowd_vrt::CvssV3Vector;
use std::str::FromStr;
let vector = CvssV3Vector::from_str("AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H")
.expect("Invalid CVSS vector");
assert_eq!(vector.to_string(), "AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H");Fields§
§attack_vector: AttackVectorAttack Vector
attack_complexity: AttackComplexityAttack Complexity
privileges_required: PrivilegesRequiredPrivileges Required
user_interaction: UserInteractionUser Interaction
scope: ScopeScope
confidentiality: ImpactConfidentiality Impact
integrity: ImpactIntegrity Impact
availability: ImpactAvailability Impact
Implementations§
Source§impl CvssV3Vector
impl CvssV3Vector
Sourcepub fn new(
attack_vector: AttackVector,
attack_complexity: AttackComplexity,
privileges_required: PrivilegesRequired,
user_interaction: UserInteraction,
scope: Scope,
confidentiality: Impact,
integrity: Impact,
availability: Impact,
) -> Self
pub fn new( attack_vector: AttackVector, attack_complexity: AttackComplexity, privileges_required: PrivilegesRequired, user_interaction: UserInteraction, scope: Scope, confidentiality: Impact, integrity: Impact, availability: Impact, ) -> Self
Creates a new CVSS v3 vector with all fields
Sourcepub fn is_no_impact(&self) -> bool
pub fn is_no_impact(&self) -> bool
Returns true if this vector represents no impact (all CIA are None)
Sourcepub fn is_critical(&self) -> bool
pub fn is_critical(&self) -> bool
Returns true if this is a critical severity vector (all CIA are High)
Trait Implementations§
Source§impl Clone for CvssV3Vector
impl Clone for CvssV3Vector
Source§fn clone(&self) -> CvssV3Vector
fn clone(&self) -> CvssV3Vector
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 CvssV3Vector
impl Debug for CvssV3Vector
Source§impl<'de> Deserialize<'de> for CvssV3Vector
impl<'de> Deserialize<'de> for CvssV3Vector
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for CvssV3Vector
impl Display for CvssV3Vector
Source§impl From<CvssV3Vector> for String
impl From<CvssV3Vector> for String
Source§fn from(vector: CvssV3Vector) -> String
fn from(vector: CvssV3Vector) -> String
Converts to this type from the input type.
Source§impl FromStr for CvssV3Vector
impl FromStr for CvssV3Vector
Source§impl PartialEq for CvssV3Vector
impl PartialEq for CvssV3Vector
Source§impl Serialize for CvssV3Vector
impl Serialize for CvssV3Vector
Source§impl TryFrom<String> for CvssV3Vector
impl TryFrom<String> for CvssV3Vector
impl Eq for CvssV3Vector
impl StructuralPartialEq for CvssV3Vector
Auto Trait Implementations§
impl Freeze for CvssV3Vector
impl RefUnwindSafe for CvssV3Vector
impl Send for CvssV3Vector
impl Sync for CvssV3Vector
impl Unpin for CvssV3Vector
impl UnwindSafe for CvssV3Vector
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