Skip to main content

rustenium_cdp_definitions/js_protocol/debugger/
results.rs

1use serde::{Deserialize, Serialize};
2#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
3pub struct ContinueToLocationResult {}
4impl TryFrom<serde_json::Value> for ContinueToLocationResult {
5    type Error = serde_json::Error;
6    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
7        serde_json::from_value(value)
8    }
9}
10#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
11pub struct DisableResult {}
12impl TryFrom<serde_json::Value> for DisableResult {
13    type Error = serde_json::Error;
14    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
15        serde_json::from_value(value)
16    }
17}
18#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
19pub struct EnableResult {
20    #[doc = "Unique identifier of the debugger."]
21    #[serde(rename = "debuggerId")]
22    pub debugger_id: crate::js_protocol::runtime::types::UniqueDebuggerId,
23}
24impl TryFrom<serde_json::Value> for EnableResult {
25    type Error = serde_json::Error;
26    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
27        serde_json::from_value(value)
28    }
29}
30#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
31pub struct EvaluateOnCallFrameResult {
32    #[doc = "Object wrapper for the evaluation result."]
33    #[serde(rename = "result")]
34    pub result: crate::js_protocol::runtime::types::RemoteObject,
35    #[doc = "Exception details."]
36    #[serde(rename = "exceptionDetails")]
37    #[serde(skip_serializing_if = "Option::is_none")]
38    #[serde(default)]
39    pub exception_details: Option<crate::js_protocol::runtime::types::ExceptionDetails>,
40}
41impl TryFrom<serde_json::Value> for EvaluateOnCallFrameResult {
42    type Error = serde_json::Error;
43    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
44        serde_json::from_value(value)
45    }
46}
47#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
48pub struct GetPossibleBreakpointsResult {
49    #[doc = "List of the possible breakpoint locations."]
50    #[serde(rename = "locations")]
51    #[serde(skip_serializing_if = "Vec::is_empty")]
52    pub locations: Vec<super::types::BreakLocation>,
53}
54impl TryFrom<serde_json::Value> for GetPossibleBreakpointsResult {
55    type Error = serde_json::Error;
56    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
57        serde_json::from_value(value)
58    }
59}
60#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
61pub struct GetScriptSourceResult {
62    #[doc = "Script source (empty in case of Wasm bytecode)."]
63    #[serde(rename = "scriptSource")]
64    pub script_source: String,
65    #[doc = "Wasm bytecode."]
66    #[serde(rename = "bytecode")]
67    #[serde(skip_serializing_if = "Option::is_none")]
68    #[serde(default)]
69    pub bytecode: Option<crate::Binary>,
70}
71impl TryFrom<serde_json::Value> for GetScriptSourceResult {
72    type Error = serde_json::Error;
73    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
74        serde_json::from_value(value)
75    }
76}
77#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
78pub struct DisassembleWasmModuleResult {
79    #[doc = "For large modules, return a stream from which additional chunks of\ndisassembly can be read successively."]
80    #[serde(rename = "streamId")]
81    #[serde(skip_serializing_if = "Option::is_none")]
82    #[serde(default)]
83    pub stream_id: Option<String>,
84    #[doc = "The total number of lines in the disassembly text."]
85    #[serde(rename = "totalNumberOfLines")]
86    pub total_number_of_lines: i64,
87    #[doc = "The offsets of all function bodies, in the format [start1, end1,\nstart2, end2, ...] where all ends are exclusive."]
88    #[serde(rename = "functionBodyOffsets")]
89    #[serde(skip_serializing_if = "Vec::is_empty")]
90    pub function_body_offsets: Vec<i64>,
91    #[doc = "The first chunk of disassembly."]
92    #[serde(rename = "chunk")]
93    pub chunk: super::types::WasmDisassemblyChunk,
94}
95impl TryFrom<serde_json::Value> for DisassembleWasmModuleResult {
96    type Error = serde_json::Error;
97    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
98        serde_json::from_value(value)
99    }
100}
101#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
102pub struct NextWasmDisassemblyChunkResult {
103    #[doc = "The next chunk of disassembly."]
104    #[serde(rename = "chunk")]
105    pub chunk: super::types::WasmDisassemblyChunk,
106}
107impl TryFrom<serde_json::Value> for NextWasmDisassemblyChunkResult {
108    type Error = serde_json::Error;
109    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
110        serde_json::from_value(value)
111    }
112}
113#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
114pub struct GetWasmBytecodeResult {
115    #[doc = "Script source."]
116    #[serde(rename = "bytecode")]
117    pub bytecode: crate::Binary,
118}
119impl TryFrom<serde_json::Value> for GetWasmBytecodeResult {
120    type Error = serde_json::Error;
121    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
122        serde_json::from_value(value)
123    }
124}
125#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
126pub struct GetStackTraceResult {
127    #[serde(rename = "stackTrace")]
128    pub stack_trace: crate::js_protocol::runtime::types::StackTrace,
129}
130impl TryFrom<serde_json::Value> for GetStackTraceResult {
131    type Error = serde_json::Error;
132    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
133        serde_json::from_value(value)
134    }
135}
136#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
137pub struct PauseResult {}
138impl TryFrom<serde_json::Value> for PauseResult {
139    type Error = serde_json::Error;
140    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
141        serde_json::from_value(value)
142    }
143}
144#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
145pub struct PauseOnAsyncCallResult {}
146impl TryFrom<serde_json::Value> for PauseOnAsyncCallResult {
147    type Error = serde_json::Error;
148    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
149        serde_json::from_value(value)
150    }
151}
152#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
153pub struct RemoveBreakpointResult {}
154impl TryFrom<serde_json::Value> for RemoveBreakpointResult {
155    type Error = serde_json::Error;
156    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
157        serde_json::from_value(value)
158    }
159}
160#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
161pub struct RestartFrameResult {}
162impl TryFrom<serde_json::Value> for RestartFrameResult {
163    type Error = serde_json::Error;
164    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
165        serde_json::from_value(value)
166    }
167}
168#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
169pub struct ResumeResult {}
170impl TryFrom<serde_json::Value> for ResumeResult {
171    type Error = serde_json::Error;
172    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
173        serde_json::from_value(value)
174    }
175}
176#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
177pub struct SearchInContentResult {
178    #[doc = "List of search matches."]
179    #[serde(rename = "result")]
180    #[serde(skip_serializing_if = "Vec::is_empty")]
181    pub result: Vec<super::types::SearchMatch>,
182}
183impl TryFrom<serde_json::Value> for SearchInContentResult {
184    type Error = serde_json::Error;
185    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
186        serde_json::from_value(value)
187    }
188}
189#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
190pub struct SetAsyncCallStackDepthResult {}
191impl TryFrom<serde_json::Value> for SetAsyncCallStackDepthResult {
192    type Error = serde_json::Error;
193    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
194        serde_json::from_value(value)
195    }
196}
197#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
198pub struct SetBlackboxExecutionContextsResult {}
199impl TryFrom<serde_json::Value> for SetBlackboxExecutionContextsResult {
200    type Error = serde_json::Error;
201    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
202        serde_json::from_value(value)
203    }
204}
205#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
206pub struct SetBlackboxPatternsResult {}
207impl TryFrom<serde_json::Value> for SetBlackboxPatternsResult {
208    type Error = serde_json::Error;
209    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
210        serde_json::from_value(value)
211    }
212}
213#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
214pub struct SetBlackboxedRangesResult {}
215impl TryFrom<serde_json::Value> for SetBlackboxedRangesResult {
216    type Error = serde_json::Error;
217    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
218        serde_json::from_value(value)
219    }
220}
221#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
222pub struct SetBreakpointResult {
223    #[doc = "Id of the created breakpoint for further reference."]
224    #[serde(rename = "breakpointId")]
225    pub breakpoint_id: super::types::BreakpointId,
226    #[doc = "Location this breakpoint resolved into."]
227    #[serde(rename = "actualLocation")]
228    pub actual_location: super::types::Location,
229}
230impl TryFrom<serde_json::Value> for SetBreakpointResult {
231    type Error = serde_json::Error;
232    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
233        serde_json::from_value(value)
234    }
235}
236#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
237pub struct SetInstrumentationBreakpointResult {
238    #[doc = "Id of the created breakpoint for further reference."]
239    #[serde(rename = "breakpointId")]
240    pub breakpoint_id: super::types::BreakpointId,
241}
242impl TryFrom<serde_json::Value> for SetInstrumentationBreakpointResult {
243    type Error = serde_json::Error;
244    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
245        serde_json::from_value(value)
246    }
247}
248#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
249pub struct SetBreakpointByUrlResult {
250    #[doc = "Id of the created breakpoint for further reference."]
251    #[serde(rename = "breakpointId")]
252    pub breakpoint_id: super::types::BreakpointId,
253    #[doc = "List of the locations this breakpoint resolved into upon addition."]
254    #[serde(rename = "locations")]
255    #[serde(skip_serializing_if = "Vec::is_empty")]
256    pub locations: Vec<super::types::Location>,
257}
258impl TryFrom<serde_json::Value> for SetBreakpointByUrlResult {
259    type Error = serde_json::Error;
260    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
261        serde_json::from_value(value)
262    }
263}
264#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
265pub struct SetBreakpointOnFunctionCallResult {
266    #[doc = "Id of the created breakpoint for further reference."]
267    #[serde(rename = "breakpointId")]
268    pub breakpoint_id: super::types::BreakpointId,
269}
270impl TryFrom<serde_json::Value> for SetBreakpointOnFunctionCallResult {
271    type Error = serde_json::Error;
272    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
273        serde_json::from_value(value)
274    }
275}
276#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
277pub struct SetBreakpointsActiveResult {}
278impl TryFrom<serde_json::Value> for SetBreakpointsActiveResult {
279    type Error = serde_json::Error;
280    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
281        serde_json::from_value(value)
282    }
283}
284#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
285pub struct SetPauseOnExceptionsResult {}
286impl TryFrom<serde_json::Value> for SetPauseOnExceptionsResult {
287    type Error = serde_json::Error;
288    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
289        serde_json::from_value(value)
290    }
291}
292#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
293pub struct SetReturnValueResult {}
294impl TryFrom<serde_json::Value> for SetReturnValueResult {
295    type Error = serde_json::Error;
296    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
297        serde_json::from_value(value)
298    }
299}
300#[doc = "Whether the operation was successful or not. Only `Ok` denotes a\nsuccessful live edit while the other enum variants denote why\nthe live edit failed."]
301#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
302pub enum SetScriptSourceResultStatus {
303    #[serde(rename = "Ok")]
304    Ok,
305    #[serde(rename = "CompileError")]
306    CompileError,
307    #[serde(rename = "BlockedByActiveGenerator")]
308    BlockedByActiveGenerator,
309    #[serde(rename = "BlockedByActiveFunction")]
310    BlockedByActiveFunction,
311    #[serde(rename = "BlockedByTopLevelEsModuleChange")]
312    BlockedByTopLevelEsModuleChange,
313}
314#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
315pub struct SetScriptSourceResult {
316    #[doc = "Whether the operation was successful or not. Only `Ok` denotes a\nsuccessful live edit while the other enum variants denote why\nthe live edit failed."]
317    #[serde(rename = "status")]
318    pub status: SetScriptSourceResultStatus,
319    #[doc = "Exception details if any. Only present when `status` is `CompileError`."]
320    #[serde(rename = "exceptionDetails")]
321    #[serde(skip_serializing_if = "Option::is_none")]
322    #[serde(default)]
323    pub exception_details: Option<crate::js_protocol::runtime::types::ExceptionDetails>,
324}
325impl TryFrom<serde_json::Value> for SetScriptSourceResult {
326    type Error = serde_json::Error;
327    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
328        serde_json::from_value(value)
329    }
330}
331#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
332pub struct SetSkipAllPausesResult {}
333impl TryFrom<serde_json::Value> for SetSkipAllPausesResult {
334    type Error = serde_json::Error;
335    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
336        serde_json::from_value(value)
337    }
338}
339#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
340pub struct SetVariableValueResult {}
341impl TryFrom<serde_json::Value> for SetVariableValueResult {
342    type Error = serde_json::Error;
343    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
344        serde_json::from_value(value)
345    }
346}
347#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
348pub struct StepIntoResult {}
349impl TryFrom<serde_json::Value> for StepIntoResult {
350    type Error = serde_json::Error;
351    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
352        serde_json::from_value(value)
353    }
354}
355#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
356pub struct StepOutResult {}
357impl TryFrom<serde_json::Value> for StepOutResult {
358    type Error = serde_json::Error;
359    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
360        serde_json::from_value(value)
361    }
362}
363#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
364pub struct StepOverResult {}
365impl TryFrom<serde_json::Value> for StepOverResult {
366    type Error = serde_json::Error;
367    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
368        serde_json::from_value(value)
369    }
370}