pub struct BaselineData { /* private fields */ }Expand description
Baseline data for comparison.
Implementations§
Source§impl BaselineData
impl BaselineData
Sourcepub const REQUIRED_KEYS: &'static [&'static str]
pub const REQUIRED_KEYS: &'static [&'static str]
The keys a dead-code baseline cannot load without. They carry no serde default, so a file that deserializes into this struct carries all of them, and a file carrying none of them is not a dead-code baseline however it is spelled. Deliberately a subset of what the format writes: the rest are optional and say nothing about which command wrote the file.
Sourcepub fn from_results(results: &AnalysisResults, root: &Path) -> Self
pub fn from_results(results: &AnalysisResults, root: &Path) -> Self
Build baseline keys from analysis results under the syntactic analysis identity (the default for runs without semantic analysis).
Sourcepub fn from_results_with_identity(
results: &AnalysisResults,
root: &Path,
analysis_identity: SemanticAnalysisIdentity,
) -> Self
pub fn from_results_with_identity( results: &AnalysisResults, root: &Path, analysis_identity: SemanticAnalysisIdentity, ) -> Self
Build baseline keys from analysis results, stamping the given analysis identity so later loads can reject baselines produced under an incompatible analysis mode.
Sourcepub const fn analysis_identity(&self) -> &SemanticAnalysisIdentity
pub const fn analysis_identity(&self) -> &SemanticAnalysisIdentity
The analysis identity this baseline was captured under.
Sourcepub fn total_entries(&self) -> usize
pub fn total_entries(&self) -> usize
Total number of entries across all categories.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for BaselineData
impl<'de> Deserialize<'de> for BaselineData
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>,
Auto Trait Implementations§
impl Freeze for BaselineData
impl RefUnwindSafe for BaselineData
impl Send for BaselineData
impl Sync for BaselineData
impl Unpin for BaselineData
impl UnsafeUnpin for BaselineData
impl UnwindSafe for BaselineData
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
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more