client-api: Add From conversions for sync_events::Filter
This commit is contained in:
parent
7764671c36
commit
83140b585c
@ -116,6 +116,18 @@ pub enum Filter<'a> {
|
|||||||
FilterId(&'a str),
|
FilterId(&'a str),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<'a> From<FilterDefinition<'a>> for Filter<'a> {
|
||||||
|
fn from(def: FilterDefinition<'a>) -> Self {
|
||||||
|
Self::FilterDefinition(def)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<'a> From<&'a str> for Filter<'a> {
|
||||||
|
fn from(id: &'a str) -> Self {
|
||||||
|
Self::FilterId(id)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// Updates to rooms.
|
/// Updates to rooms.
|
||||||
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
||||||
pub struct Rooms {
|
pub struct Rooms {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user