electron_sys/interface/
start_logging_options.rs

1use js_sys::JsString;
2use wasm_bindgen::prelude::*;
3
4#[wasm_bindgen]
5#[derive(Clone, Debug, PartialEq)]
6pub struct StartLoggingOptions {
7    capture_mode: Option<JsString>,
8    max_file_size: Option<usize>,
9}
10
11#[wasm_bindgen]
12impl StartLoggingOptions {
13    #[wasm_bindgen(constructor)]
14    pub fn new(capture_mode: Option<JsString>, max_file_size: Option<usize>) -> StartLoggingOptions {
15        StartLoggingOptions {
16            capture_mode,
17            max_file_size,
18        }
19    }
20
21    #[wasm_bindgen(getter, js_name = "captureMode")]
22    pub fn capture_mode(&self) -> Option<JsString> {
23        self.capture_mode.clone()
24    }
25
26    #[wasm_bindgen(setter)]
27    pub fn set_capture_mode(&mut self, value: Option<JsString>) {
28        self.capture_mode = value;
29    }
30
31    #[wasm_bindgen(getter, js_name = "maxFileSize")]
32    pub fn max_file_size(&self) -> Option<usize> {
33        self.max_file_size
34    }
35
36    #[wasm_bindgen(setter)]
37    pub fn set_max_file_size(&mut self, value: Option<usize>) {
38        self.max_file_size = value;
39    }
40}