pub struct Summary {
pub prod_functions: usize,
pub prod_structs: usize,
pub prod_other: usize,
pub test_units: usize,
pub prod_lines_added: usize,
pub prod_lines_removed: usize,
pub test_lines_added: usize,
pub test_lines_removed: usize,
pub weighted_score: usize,
pub exceeds_limit: bool,
}Expand description
Summary of analysis results
Fields§
§prod_functions: usizeNumber of production functions changed
prod_structs: usizeNumber of production structs changed
prod_other: usizeNumber of other production units changed
test_units: usizeTotal number of test-related units changed
prod_lines_added: usizeLines added in production code
prod_lines_removed: usizeLines removed from production code
test_lines_added: usizeLines added in test code
test_lines_removed: usizeLines removed from test code
weighted_score: usizeWeighted score based on configuration
exceeds_limit: boolWhether any limit was exceeded
Implementations§
Source§impl Summary
impl Summary
Sourcepub fn total_prod_units(&self) -> usize
pub fn total_prod_units(&self) -> usize
Returns total number of production units changed
§Returns
Sum of all production unit counts
§Examples
use rust_diff_analyzer::types::Summary;
let summary = Summary {
prod_functions: 5,
prod_structs: 2,
prod_other: 1,
test_units: 10,
prod_lines_added: 50,
prod_lines_removed: 20,
test_lines_added: 100,
test_lines_removed: 30,
weighted_score: 0,
exceeds_limit: false,
};
assert_eq!(summary.total_prod_units(), 8);Trait Implementations§
Source§impl<'de> Deserialize<'de> for Summary
impl<'de> Deserialize<'de> for Summary
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
impl Eq for Summary
impl StructuralPartialEq for Summary
Auto Trait Implementations§
impl Freeze for Summary
impl RefUnwindSafe for Summary
impl Send for Summary
impl Sync for Summary
impl Unpin for Summary
impl UnwindSafe for Summary
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