1
0
Fork 0
mirror of https://forgejo.ellis.link/continuwuation/continuwuity.git synced 2025-08-01 20:58:31 +00:00
continuwuity/src/service/pusher/data.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
457 B
Rust
Raw Normal View History

2022-10-05 20:34:31 +02:00
use ruma::{
2022-11-09 18:46:10 +01:00
api::client::push::{set_pusher, Pusher},
2022-10-05 20:34:31 +02:00
UserId,
};
2022-09-07 13:25:51 +02:00
use crate::Result;
2022-10-05 15:33:57 +02:00
pub trait Data: Send + Sync {
2022-11-09 18:46:10 +01:00
fn set_pusher(&self, sender: &UserId, pusher: set_pusher::v3::PusherAction) -> Result<()>;
2022-11-09 18:46:10 +01:00
fn get_pusher(&self, sender: &UserId, pushkey: &str) -> Result<Option<Pusher>>;
2021-06-08 18:10:00 +02:00
2022-11-09 18:46:10 +01:00
fn get_pushers(&self, sender: &UserId) -> Result<Vec<Pusher>>;
2022-10-08 13:03:07 +02:00
fn get_pushkeys<'a>(&'a self, sender: &UserId) -> Box<dyn Iterator<Item = Result<String>> + 'a>;
}