Add extra_content method for events.
This commit is contained in:
parent
af8e5f2205
commit
c7228fc3b3
@ -91,6 +91,12 @@ pub trait Event: Debug + Deserialize + Serialize {
|
|||||||
|
|
||||||
/// The type of the event.
|
/// The type of the event.
|
||||||
fn event_type(&self) -> &EventType;
|
fn event_type(&self) -> &EventType;
|
||||||
|
|
||||||
|
/// Extra top-level key-value pairs specific to this event type, but that are not under the
|
||||||
|
/// `content` field.
|
||||||
|
fn extra_content(&self) -> Option<Value> {
|
||||||
|
None
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// An event within the context of a room.
|
/// An event within the context of a room.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user