ruwuma/crates/ruma-common/tests/events/ui/04-event-sanity-check.rs
Kévin Commaille dc591647f8 events: Remove StateUnsignedFromParts
Replace it with a bound on DeserializeOwned
2023-01-10 11:37:31 +01:00

21 lines
570 B
Rust

use ruma_common::{
events::{StateEventContent, StateUnsigned},
MilliSecondsSinceUnixEpoch, OwnedEventId, OwnedRoomId, OwnedUserId,
};
use ruma_macros::Event;
use serde::de::DeserializeOwned;
/// State event.
#[derive(Clone, Debug, Event)]
pub struct OriginalStateEvent<C: StateEventContent + DeserializeOwned> {
pub content: C,
pub event_id: OwnedEventId,
pub sender: OwnedUserId,
pub origin_server_ts: MilliSecondsSinceUnixEpoch,
pub room_id: OwnedRoomId,
pub state_key: C::StateKey,
pub unsigned: StateUnsigned<C>,
}
fn main() {}