1#![feature(unboxed_closures, fn_traits)]
12
13#[macro_use]
14extern crate clone_macro;
15#[allow(unused_imports)]
16#[macro_use]
17extern crate tracing;
18#[macro_use]
19extern crate typed_builder;
20
21#[macro_use]
22mod utils;
23pub mod auth;
24pub mod firestore;
25pub mod functions;
26pub mod storage;
27
28use std::{error::Error, fmt};
29
30use wasm_bindgen::prelude::*;
31
32impl fmt::Display for FirebaseError {
33 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
34 self.message().fmt(f)
35 }
36}
37
38impl Error for FirebaseError {}
39
40#[wasm_bindgen]
41extern "C" {
42 #[derive(Clone, Debug)]
43 pub type FirebaseError;
44
45 #[wasm_bindgen(method, getter)]
46 pub fn code(this: &FirebaseError) -> String;
47
48 #[wasm_bindgen(method, getter)]
49 pub fn message(this: &FirebaseError) -> String;
50}