pub struct ScriptCoverage {
pub script_id: String,
pub url: String,
pub functions: Vec<FunctionCoverage>,
}Expand description
Coverage data for a single script (JS file or WASM module)
Fields§
§script_id: StringScript ID from CDP
url: StringScript URL
functions: Vec<FunctionCoverage>Functions in this script
Implementations§
Source§impl ScriptCoverage
impl ScriptCoverage
Sourcepub fn functions_executed(&self) -> usize
pub fn functions_executed(&self) -> usize
Count functions that were executed
Sourcepub fn functions_total(&self) -> usize
pub fn functions_total(&self) -> usize
Count total functions
Sourcepub fn coverage_percent(&self) -> f64
pub fn coverage_percent(&self) -> f64
Calculate coverage percentage
Trait Implementations§
Source§impl Clone for ScriptCoverage
impl Clone for ScriptCoverage
Source§fn clone(&self) -> ScriptCoverage
fn clone(&self) -> ScriptCoverage
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 ScriptCoverage
impl Debug for ScriptCoverage
Source§impl<'de> Deserialize<'de> for ScriptCoverage
impl<'de> Deserialize<'de> for ScriptCoverage
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 ScriptCoverage
impl RefUnwindSafe for ScriptCoverage
impl Send for ScriptCoverage
impl Sync for ScriptCoverage
impl Unpin for ScriptCoverage
impl UnsafeUnpin for ScriptCoverage
impl UnwindSafe for ScriptCoverage
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