chrome_devtools/domain/runtime/event/
console_api_called.rs1use std::fmt;
2
3use serde::{Deserialize, Serialize};
4
5use crate::domain::runtime::r#type::RemoteObject;
6
7#[derive(Debug, Serialize, Deserialize, Clone)]
10pub struct Event {
11 pub r#type: String, pub args: Vec<RemoteObject>,
15 }
17
18impl fmt::Display for Event {
19 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
20 let last_index = self.args.len() - 1;
21 for (index, arg) in self.args.iter().enumerate() {
22 write!(f, "{}", arg)?;
23 if index < last_index {
24 write!(f, " ")?;
25 }
26 }
27 Ok(())
28 }
29}