#[non_exhaustive]pub enum FunctionChange {
Added {
current: FunctionVerdict,
},
Removed {
baseline: FunctionVerdict,
},
Modified {
baseline: FunctionVerdict,
current: FunctionVerdict,
},
}Expand description
A single function’s change between baseline and current.
Variants carry the full FunctionVerdict for both sides where
applicable so reporters can render baseline / current scores side by
side without re-querying the original AnalysisResults. The
Modified variant is the dominant case
for established codebases; Added and Removed track structural
drift.
Unchanged is not a variant. The View pipeline only surfaces
changes; if downstream tooling needs to enumerate all current
functions it consumes current.functions directly.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Implementations§
Source§impl FunctionChange
impl FunctionChange
pub fn kind(&self) -> ChangeKind
pub fn current_score(&self) -> Option<f64>
pub fn baseline_score(&self) -> Option<f64>
Sourcepub fn score_delta(&self) -> Option<f64>
pub fn score_delta(&self) -> Option<f64>
current - baseline for Modified; None for Added / Removed.
Sourcepub fn file_path(&self) -> &str
pub fn file_path(&self) -> &str
File path associated with this change. For Modified, baseline and current share the same path (matching keys on file_path).
Sourcepub fn qualified_name(&self) -> &str
pub fn qualified_name(&self) -> &str
Qualified name associated with this change.
Trait Implementations§
Source§impl Clone for FunctionChange
impl Clone for FunctionChange
Source§fn clone(&self) -> FunctionChange
fn clone(&self) -> FunctionChange
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 FunctionChange
impl Debug for FunctionChange
Auto Trait Implementations§
impl Freeze for FunctionChange
impl RefUnwindSafe for FunctionChange
impl Send for FunctionChange
impl Sync for FunctionChange
impl Unpin for FunctionChange
impl UnsafeUnpin for FunctionChange
impl UnwindSafe for FunctionChange
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