Conditionally emit rocket::http_verb attr macros if lib/bin

This commit is contained in:
Devin Ragotzy 2020-07-25 23:08:00 -04:00 committed by timokoesters
parent b82fd02ee3
commit 42e0102a2a
No known key found for this signature in database
GPG key ID: 24DA7517711A2BA4
8 changed files with 453 additions and 170 deletions

24
src/lib.rs Normal file
View file

@ -0,0 +1,24 @@
pub mod client_server;
mod database;
mod error;
mod pdu;
pub mod push_rules;
mod ruma_wrapper;
mod utils;
pub use database::Database;
pub use error::{Error, Result};
pub use pdu::PduEvent;
pub use ruma_wrapper::{ConduitResult, Ruma, RumaResponse};
use std::ops::Deref;
pub struct State<'r, T: Send + Sync + 'static>(&'r T);
impl<'r, T: Send + Sync + 'static> Deref for State<'r, T> {
type Target = T;
#[inline(always)]
fn deref(&self) -> &T {
self.0
}
}