mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-09-11 21:53:02 +02:00
optimize with SmallString; consolidate related re-exports
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
ecc9099127
commit
b872f8e593
39 changed files with 113 additions and 96 deletions
|
@ -8,6 +8,7 @@ mod id;
|
|||
mod raw_id;
|
||||
mod redact;
|
||||
mod relation;
|
||||
mod state_key;
|
||||
mod strip;
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
@ -17,7 +18,7 @@ use std::cmp::Ordering;
|
|||
|
||||
use ruma::{
|
||||
events::TimelineEventType, CanonicalJsonObject, CanonicalJsonValue, EventId, OwnedEventId,
|
||||
OwnedRoomId, OwnedUserId, UInt,
|
||||
OwnedRoomId, OwnedServerName, OwnedUserId, UInt,
|
||||
};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json::value::RawValue as RawJsonValue;
|
||||
|
@ -29,6 +30,7 @@ pub use self::{
|
|||
event_id::*,
|
||||
id::*,
|
||||
raw_id::*,
|
||||
state_key::{ShortStateKey, StateKey},
|
||||
Count as PduCount, Id as PduId, Pdu as PduEvent, RawId as RawPduId,
|
||||
};
|
||||
use crate::Result;
|
||||
|
@ -40,13 +42,13 @@ pub struct Pdu {
|
|||
pub room_id: OwnedRoomId,
|
||||
pub sender: OwnedUserId,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub origin: Option<String>,
|
||||
pub origin: Option<OwnedServerName>,
|
||||
pub origin_server_ts: UInt,
|
||||
#[serde(rename = "type")]
|
||||
pub kind: TimelineEventType,
|
||||
pub content: Box<RawJsonValue>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub state_key: Option<String>,
|
||||
pub state_key: Option<StateKey>,
|
||||
pub prev_events: Vec<OwnedEventId>,
|
||||
pub depth: UInt,
|
||||
pub auth_events: Vec<OwnedEventId>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue