1 use crate::websocket::WebsocketInfo;
3 r2d2::{ConnectionManager, Pool},
14 #[derive(Fail, Debug)]
15 #[fail(display = "{{\"error\":\"{}\"}}", message)]
21 pub fn err(msg: &str) -> Self {
23 message: msg.to_string(),
32 impl<Data> Oper<Data> {
33 pub fn new(data: Data) -> Oper<Data> {
39 type Response: serde::ser::Serialize + Send;
43 pool: Pool<ConnectionManager<PgConnection>>,
44 websocket_info: Option<WebsocketInfo>,
45 ) -> Result<Self::Response, Error>;