firebase_js/lib.rs
1//! `firebase-js` wraps the Firebase JavaScript SDK for use in Rust and WebAssembly.
2//!
3//! ## WIP:
4//! Currently, no errors are handled :(
5
6use thiserror::Error;
7use wasm_bindgen::prelude::Closure;
8use wasm_bindgen::{JsValue};
9
10#[allow(non_camel_case_types)]
11type closure<Args> = Closure<dyn FnMut(Args)>;
12
13pub mod app;
14
15pub mod database;
16
17#[derive(Debug, Error)]
18pub enum FirebaseError {
19 #[error("No errors implemented yet!")]
20 UnimplementedErrorHandling,
21
22 #[error("Unhandled raw `JsValue`, this is the library maintainer's fault :)")]
23 RawJsValueError(JsValue),
24}