pub struct FunctionCoverage {
pub function_name: String,
pub ranges: Vec<CoverageRange>,
pub is_block_coverage: bool,
}Expand description
Coverage data for a single function
Fields§
§function_name: StringFunction name (may be empty for anonymous functions)
ranges: Vec<CoverageRange>Ranges within this function that were covered
is_block_coverage: boolWhether this function was called at all
Implementations§
Source§impl FunctionCoverage
impl FunctionCoverage
Sourcepub fn was_executed(&self) -> bool
pub fn was_executed(&self) -> bool
Check if the function was executed at least once
Sourcepub fn total_count(&self) -> u32
pub fn total_count(&self) -> u32
Get total execution count across all ranges
Sourcepub fn byte_range(&self) -> Option<(u32, u32)>
pub fn byte_range(&self) -> Option<(u32, u32)>
Get the byte range covered
Trait Implementations§
Source§impl Clone for FunctionCoverage
impl Clone for FunctionCoverage
Source§fn clone(&self) -> FunctionCoverage
fn clone(&self) -> FunctionCoverage
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 FunctionCoverage
impl Debug for FunctionCoverage
Source§impl<'de> Deserialize<'de> for FunctionCoverage
impl<'de> Deserialize<'de> for FunctionCoverage
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 FunctionCoverage
impl RefUnwindSafe for FunctionCoverage
impl Send for FunctionCoverage
impl Sync for FunctionCoverage
impl Unpin for FunctionCoverage
impl UnsafeUnpin for FunctionCoverage
impl UnwindSafe for FunctionCoverage
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