electron_sys/interface/
net_log.rs1use crate::interface::StartLoggingOptions;
2use js_sys::{JsString, Promise};
3use wasm_bindgen::prelude::*;
4
5#[wasm_bindgen]
6extern {
7 #[derive(Clone, Debug, PartialEq)]
8 pub type NetLog;
9
10 #[must_use]
15 #[wasm_bindgen(method, js_name = "startLogging")]
16 pub fn start_logging(this: &NetLog, path: &str, options: StartLoggingOptions) -> Promise;
17
18 #[must_use]
19 #[wasm_bindgen(method, js_name = "stopLogging")]
20 pub fn stop_logging(this: &NetLog) -> Promise;
21
22 #[wasm_bindgen(method, getter, js_name = "currentlyLogging")] pub fn currently_logging(this: &NetLog) -> bool;
28
29 #[wasm_bindgen(method, getter, js_name = "currentlyLoggingPath")] pub fn currently_logging_path(this: &NetLog) -> JsString;
31}