bitwarden_wasm_internal/
flight_recorder.rs1use bitwarden_logging::{FlightRecorderEvent, flight_recorder_count, read_flight_recorder};
4use wasm_bindgen::prelude::*;
5
6#[wasm_bindgen]
11pub struct FlightRecorderClient;
12
13#[wasm_bindgen]
14impl FlightRecorderClient {
15 #[wasm_bindgen(constructor)]
17 pub fn new() -> Self {
18 Self
19 }
20
21 pub fn read(&self) -> Vec<FlightRecorderEvent> {
23 read_flight_recorder()
24 }
25
26 pub fn count(&self) -> usize {
28 flight_recorder_count()
29 }
30}
31
32impl Default for FlightRecorderClient {
33 fn default() -> Self {
34 Self::new()
35 }
36}