// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. use serde::Deserialize; use serde::Serialize; #[derive(Debug, Eq, PartialEq, Serialize, Deserialize, Clone)] #[serde(rename_all = "camelCase")] pub struct CoverageRange { /// Start character index. #[serde(rename = "startOffset")] pub start_char_offset: usize, /// End character index. #[serde(rename = "endOffset")] pub end_char_offset: usize, pub count: i64, } #[derive(Debug, Eq, PartialEq, Serialize, Deserialize, Clone)] #[serde(rename_all = "camelCase")] pub struct FunctionCoverage { pub function_name: String, pub ranges: Vec, pub is_block_coverage: bool, } #[derive(Debug, Eq, PartialEq, Serialize, Deserialize, Clone)] #[serde(rename_all = "camelCase")] pub struct ScriptCoverage { pub script_id: String, pub url: String, pub functions: Vec, } #[derive(Debug, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct StartPreciseCoverageParameters { pub call_count: bool, pub detailed: bool, pub allow_triggered_updates: bool, } #[derive(Debug, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct StartPreciseCoverageReturnObject { pub timestamp: f64, } #[derive(Debug, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct TakePreciseCoverageReturnObject { pub result: Vec, pub timestamp: f64, } // TODO(bartlomieju): remove me #[derive(Eq, PartialEq, Clone, Debug, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ProcessCoverage { pub result: Vec, }