2 db::{community::*, community_view::*, moderator::*, site::*, user::*, user_view::*},
3 websocket::WebsocketInfo,
6 r2d2::{ConnectionManager, Pool},
17 #[derive(Fail, Debug)]
18 #[fail(display = "{{\"error\":\"{}\"}}", message)]
24 pub fn err(msg: &str) -> Self {
26 message: msg.to_string(),
35 impl<Data> Oper<Data> {
36 pub fn new(data: Data) -> Oper<Data> {
42 type Response: serde::ser::Serialize + Send;
46 pool: Pool<ConnectionManager<PgConnection>>,
47 websocket_info: Option<WebsocketInfo>,
48 ) -> Result<Self::Response, Error>;