pub struct BaselineFile {
pub schema_version: u32,
pub created_at: String,
pub tool_version: String,
pub entries: Vec<BaselineEntry>,
}Expand description
A versioned file that records known findings by fingerprint.
Fields§
§schema_version: u32Schema version — incremented when the format changes in a breaking way.
created_at: StringRFC3339 timestamp of when this baseline was created.
tool_version: StringVersion of agentshield that wrote this file.
entries: Vec<BaselineEntry>Known finding entries.
Implementations§
Source§impl BaselineFile
impl BaselineFile
Sourcepub fn new(entries: Vec<BaselineEntry>) -> Self
pub fn new(entries: Vec<BaselineEntry>) -> Self
Create a new baseline from a list of entries, stamped with the current time.
Sourcepub fn load(path: &Path) -> Result<Self>
pub fn load(path: &Path) -> Result<Self>
Load a baseline from a JSON file on disk.
Returns an error if the file cannot be read, if the JSON is malformed,
or if the schema_version is newer than this tool supports.
Trait Implementations§
Source§impl Clone for BaselineFile
impl Clone for BaselineFile
Source§fn clone(&self) -> BaselineFile
fn clone(&self) -> BaselineFile
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 BaselineFile
impl Debug for BaselineFile
Source§impl<'de> Deserialize<'de> for BaselineFile
impl<'de> Deserialize<'de> for BaselineFile
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 BaselineFile
impl RefUnwindSafe for BaselineFile
impl Send for BaselineFile
impl Sync for BaselineFile
impl Unpin for BaselineFile
impl UnsafeUnpin for BaselineFile
impl UnwindSafe for BaselineFile
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