Add default implementations for StateEvent.
This commit is contained in:
parent
3c9f84cec1
commit
9027948381
@ -21,7 +21,12 @@ pub trait RoomEvent<'a, T>: Event<'a, T> {
|
||||
/// An event that represents some aspect of a room's state.
|
||||
pub trait StateEvent<'a, 'b, T>: RoomEvent<'a, T> {
|
||||
/// Previous content for this aspect of room state.
|
||||
fn prev_content(&'a self) -> Option<&'b T>;
|
||||
fn prev_content(&'a self) -> Option<&'b T> {
|
||||
None
|
||||
}
|
||||
|
||||
/// A unique key which defines the overwriting semantics for this aspect of room state.
|
||||
fn state_key(&self) -> &'a str;
|
||||
fn state_key(&self) -> &'a str {
|
||||
""
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user