pub struct BaselineStore {
pub version: u32,
pub records: BTreeMap<String, BaselineRecord>,
}Expand description
A collection of baseline records keyed by scenario name. Serialized as a stable, sorted JSON object.
Fields§
§version: u32Schema version for forward compatibility.
records: BTreeMap<String, BaselineRecord>Records by scenario name (BTreeMap keeps output deterministic).
Implementations§
Source§impl BaselineStore
impl BaselineStore
Sourcepub fn insert(&mut self, record: BaselineRecord)
pub fn insert(&mut self, record: BaselineRecord)
Insert or replace a record.
Sourcepub fn get(&self, scenario: &str) -> Option<&BaselineRecord>
pub fn get(&self, scenario: &str) -> Option<&BaselineRecord>
Look up a record by scenario name.
Sourcepub fn approve(&mut self, scenario: &str) -> bool
pub fn approve(&mut self, scenario: &str) -> bool
Mark a scenario’s record as approved. Returns false if absent.
Trait Implementations§
Source§impl Clone for BaselineStore
impl Clone for BaselineStore
Source§fn clone(&self) -> BaselineStore
fn clone(&self) -> BaselineStore
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 BaselineStore
impl Debug for BaselineStore
Source§impl Default for BaselineStore
impl Default for BaselineStore
Source§fn default() -> BaselineStore
fn default() -> BaselineStore
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for BaselineStore
impl<'de> Deserialize<'de> for BaselineStore
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 PartialEq for BaselineStore
impl PartialEq for BaselineStore
Source§fn eq(&self, other: &BaselineStore) -> bool
fn eq(&self, other: &BaselineStore) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for BaselineStore
impl Serialize for BaselineStore
impl StructuralPartialEq for BaselineStore
Auto Trait Implementations§
impl Freeze for BaselineStore
impl RefUnwindSafe for BaselineStore
impl Send for BaselineStore
impl Sync for BaselineStore
impl Unpin for BaselineStore
impl UnsafeUnpin for BaselineStore
impl UnwindSafe for BaselineStore
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