Add type aliases for custom events.

This commit is contained in:
Jimmy Cuadra 2016-08-18 08:46:07 -07:00
parent 7409b61ec5
commit 0dbcbd49f7

View File

@ -155,6 +155,15 @@ pub struct StateEvent<C, E> where C: Deserialize + Serialize, E: Deserialize + S
pub user_id: UserId,
}
/// A custom basic event not covered by the Matrix specification.
pub type CustomEvent = Event<Value, ()>;
/// A custom room event not covered by the Matrix specification.
pub type CustomRoomEvent = RoomEvent<Value, ()>;
/// A custom state event not covered by the Matrix specification.
pub type CustomStateEvent = StateEvent<Value, ()>;
impl Display for EventType {
fn fmt(&self, f: &mut Formatter) -> Result<(), FmtError> {
let event_type_str = match *self {