Remove ToDeviceEventContent

… since any event can be sent using to-device messaging
This commit is contained in:
Jonas Platte 2020-06-09 01:22:50 +02:00
parent 6a0a10fcff
commit 1f2c186ce1
No known key found for this signature in database
GPG Key ID: 7D261D771D915378
2 changed files with 3 additions and 6 deletions

View File

@ -4,8 +4,8 @@ use ruma_events_macros::Event;
use ruma_identifiers::{EventId, RoomId, UserId}; use ruma_identifiers::{EventId, RoomId, UserId};
use crate::{ use crate::{
BasicEventContent, EphemeralRoomEventContent, MessageEventContent, StateEventContent, BasicEventContent, EphemeralRoomEventContent, EventContent, MessageEventContent,
ToDeviceEventContent, UnsignedData, StateEventContent, UnsignedData,
}; };
/// A basic event one that consists only of it's type and the `content` object. /// A basic event one that consists only of it's type and the `content` object.
@ -79,7 +79,7 @@ pub struct StateEvent<C: StateEventContent> {
} }
#[derive(Clone, Debug, Event)] #[derive(Clone, Debug, Event)]
pub struct ToDeviceEvent<C: ToDeviceEventContent> { pub struct ToDeviceEvent<C: EventContent> {
/// Data specific to the event type. /// Data specific to the event type.
pub content: C, pub content: C,

View File

@ -234,6 +234,3 @@ pub trait MessageEventContent: RoomEventContent {}
/// Marker trait for the content of a state event. /// Marker trait for the content of a state event.
pub trait StateEventContent: RoomEventContent {} pub trait StateEventContent: RoomEventContent {}
/// Marker trait for event content types that are commonly sent using to-device messaging.
pub trait ToDeviceEventContent: EventContent {}