Add extra_content method for events.

This commit is contained in:
Jimmy Cuadra 2016-11-29 05:07:12 -08:00
parent af8e5f2205
commit c7228fc3b3

View File

@ -91,6 +91,12 @@ pub trait Event: Debug + Deserialize + Serialize {
/// The type of the event.
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.