use super::{notify, Connection, Notification, Result};
impl Connection {
pub async fn listen(&mut self, channel: &str) -> Result<()> {
notify::listen(&mut self.conn, channel).await
}
pub async fn unlisten(&mut self, channel: &str) -> Result<()> {
notify::unlisten(&mut self.conn, channel).await
}
pub async fn unlisten_all(&mut self) -> Result<()> {
notify::unlisten_all(&mut self.conn).await
}
pub async fn notify(&mut self, channel: &str, payload: &str) -> Result<()> {
notify::notify(&mut self.conn, channel, payload).await
}
pub async fn wait_for_notification(&mut self) -> Result<Notification> {
notify::wait_for_notification(&mut self.conn).await
}
}