pub struct Baseline {
pub version: String,
pub created: String,
pub entries: Vec<BaselineEntry>,
}Expand description
Baseline file containing known findings
Fields§
§version: String§created: String§entries: Vec<BaselineEntry>Implementations§
Source§impl Baseline
impl Baseline
pub fn new() -> Self
pub fn load(path: &Path) -> Result<Self, String>
pub fn save(&self, path: &Path) -> Result<(), String>
Sourcepub fn contains_fingerprint(&self, fingerprint: &Fingerprint) -> bool
pub fn contains_fingerprint(&self, fingerprint: &Fingerprint) -> bool
Check if a finding is in the baseline by fingerprint
Sourcepub fn contains(&self, rule_id: &str, file: &Path, fingerprint: &str) -> bool
pub fn contains(&self, rule_id: &str, file: &Path, fingerprint: &str) -> bool
Check if a finding is in the baseline (legacy method)
Sourcepub fn add_with_fingerprint(
&mut self,
rule_id: String,
file: PathBuf,
line: usize,
fingerprint: Fingerprint,
)
pub fn add_with_fingerprint( &mut self, rule_id: String, file: PathBuf, line: usize, fingerprint: Fingerprint, )
Add a finding to the baseline using stable fingerprint
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Baseline
impl<'de> Deserialize<'de> for Baseline
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
Auto Trait Implementations§
impl Freeze for Baseline
impl RefUnwindSafe for Baseline
impl Send for Baseline
impl Sync for Baseline
impl Unpin for Baseline
impl UnwindSafe for Baseline
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