pub enum ModifiedAttackComplexity {
NotDefined,
Low,
High,
}Expand description
Metric::ModifiedAttackComplexity (MAC) values.
§Description
Metric value which overrides the base Metric::AttackComplexity
(AC) metric value.
§Properties
- Metric Group: Environmental Metrics
- Documentation: CVSS v4.0 Specification, Section 4.2: Modified Base Metrics
§Examples
Parse string as metric:
// parse string as metric
let metric: Metric = "MAC:L".parse()?;
// check result
assert_eq!(metric, Metric::ModifiedAttackComplexity(ModifiedAttackComplexity::Low));Convert metric to string:
// convert metric to string
let s = Metric::ModifiedAttackComplexity(ModifiedAttackComplexity::High).to_string();
// check result
assert_eq!(s, "MAC:H");Get metric name:
// get metric name
let name = Name::from(Metric::ModifiedAttackComplexity(ModifiedAttackComplexity::High));
// check result
assert_eq!(name, Name::ModifiedAttackComplexity);Variants§
Trait Implementations§
Source§impl Clone for ModifiedAttackComplexity
impl Clone for ModifiedAttackComplexity
Source§fn clone(&self) -> ModifiedAttackComplexity
fn clone(&self) -> ModifiedAttackComplexity
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 ModifiedAttackComplexity
impl Debug for ModifiedAttackComplexity
Source§impl PartialEq for ModifiedAttackComplexity
impl PartialEq for ModifiedAttackComplexity
impl Copy for ModifiedAttackComplexity
impl Eq for ModifiedAttackComplexity
impl StructuralPartialEq for ModifiedAttackComplexity
Auto Trait Implementations§
impl Freeze for ModifiedAttackComplexity
impl RefUnwindSafe for ModifiedAttackComplexity
impl Send for ModifiedAttackComplexity
impl Sync for ModifiedAttackComplexity
impl Unpin for ModifiedAttackComplexity
impl UnsafeUnpin for ModifiedAttackComplexity
impl UnwindSafe for ModifiedAttackComplexity
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