Skip to main content

pouch/
lib.rs

1#![doc(html_favicon_url = "https://www.pouch.rs/assets/images/favicon.ico")]
2#![doc(html_logo_url = "https://www.pouch.rs/assets/images/logo.svg")]
3
4/// The pouch database
5mod database;
6pub use crate::database::Database;
7
8/// Types used with the database
9pub mod types;
10
11/// Pouch specific error types
12pub mod errors;
13
14/// Bindings to the PouchDB module
15mod pouchdb;
16
17/// Utils like logging
18mod utils;
19
20/// Returns the crate version
21///
22/// # Examples
23///
24/// ```
25/// // the version is returned as &str
26/// let version = pouch::version();
27/// ```
28pub fn version() -> &'static str {
29    env!("CARGO_PKG_VERSION")
30}
31
32/// The Pouch prelude
33///
34/// The purpose of this module is to alleviate imports of many common types:
35///
36/// ```
37/// # #![allow(unused_imports)]
38/// use pouch::prelude::*;
39/// ```
40pub mod prelude {
41    pub use crate::database::Database;
42    pub use crate::errors::Error;
43    pub use crate::types::DatabaseInfo;
44}
45
46pub use self::prelude::*;