Files
continuwuity/src/service/appservice/data.rs
T

19 lines
631 B
Rust
Raw Normal View History

pub trait Data {
2022-09-06 23:15:09 +02:00
type Iter: Iterator;
/// Registers an appservice and returns the ID to the caller
2022-09-06 23:15:09 +02:00
fn register_appservice(&self, yaml: serde_yaml::Value) -> Result<String>;
/// Remove an appservice registration
///
/// # Arguments
///
/// * `service_name` - the name you send to register the service previously
2022-09-06 23:15:09 +02:00
fn unregister_appservice(&self, service_name: &str) -> Result<()>;
2022-09-06 23:15:09 +02:00
fn get_registration(&self, id: &str) -> Result<Option<serde_yaml::Value>>;
2022-09-06 23:15:09 +02:00
fn iter_ids(&self) -> Result<Self::Iter<Item = Result<String>>>;
2022-09-06 23:15:09 +02:00
fn all(&self) -> Result<Vec<(String, serde_yaml::Value)>>;
}