continuwuity/src/service/pusher/data.rs
strawberry 66bb88a03a make everything pub(crate) instead of pub
conduwuit is not a library

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-26 02:03:40 -04:00

16 lines
464 B
Rust

use ruma::{
api::client::push::{set_pusher, Pusher},
UserId,
};
use crate::Result;
pub(crate) trait Data: Send + Sync {
fn set_pusher(&self, sender: &UserId, pusher: set_pusher::v3::PusherAction) -> Result<()>;
fn get_pusher(&self, sender: &UserId, pushkey: &str) -> Result<Option<Pusher>>;
fn get_pushers(&self, sender: &UserId) -> Result<Vec<Pusher>>;
fn get_pushkeys<'a>(&'a self, sender: &UserId) -> Box<dyn Iterator<Item = Result<String>> + 'a>;
}