lib

Core libraries for Radroots
git clone https://radroots.dev/git/lib.git
Log | Files | Refs | README | LICENSE

lib.rs (1518B)


      1 #![cfg_attr(not(feature = "std"), no_std)]
      2 #![forbid(unsafe_code)]
      3 
      4 #[cfg(not(feature = "std"))]
      5 compile_error!("radroots_nostr_ndb requires the std feature");
      6 
      7 extern crate alloc;
      8 
      9 #[cfg(test)]
     10 mod test_fixtures;
     11 
     12 #[cfg(feature = "ndb")]
     13 pub mod config;
     14 pub mod error;
     15 #[cfg(feature = "ndb")]
     16 pub mod filter;
     17 #[cfg(feature = "ndb")]
     18 pub mod ingest;
     19 #[cfg(feature = "ndb")]
     20 pub mod ndb;
     21 #[cfg(feature = "ndb")]
     22 pub mod query;
     23 #[cfg(all(feature = "ndb", feature = "runtime-adapter"))]
     24 pub mod runtime_adapter;
     25 #[cfg(feature = "ndb")]
     26 pub mod subscription;
     27 
     28 pub mod prelude {
     29     #[cfg(feature = "ndb")]
     30     pub use crate::config::RadrootsNostrNdbConfig;
     31     pub use crate::error::RadrootsNostrNdbError;
     32     #[cfg(feature = "ndb")]
     33     pub use crate::filter::RadrootsNostrNdbFilterSpec;
     34     #[cfg(feature = "ndb")]
     35     pub use crate::ingest::RadrootsNostrNdbIngestSource;
     36     #[cfg(feature = "ndb")]
     37     pub use crate::ndb::RadrootsNostrNdb;
     38     #[cfg(feature = "ndb")]
     39     pub use crate::query::{
     40         RadrootsNostrNdbNote, RadrootsNostrNdbProfile, RadrootsNostrNdbQuerySpec,
     41     };
     42     #[cfg(all(feature = "ndb", feature = "runtime-adapter"))]
     43     pub use crate::runtime_adapter::RadrootsNostrNdbEventSinkAdapter;
     44     #[cfg(all(feature = "ndb", feature = "rt"))]
     45     pub use crate::subscription::RadrootsNostrNdbSubscriptionStream;
     46     #[cfg(feature = "ndb")]
     47     pub use crate::subscription::{
     48         RadrootsNostrNdbNoteKey, RadrootsNostrNdbSubscriptionHandle,
     49         RadrootsNostrNdbSubscriptionSpec,
     50     };
     51 }