Struct ruma_common::events::OriginalSyncMessageLikeEvent
source · [−]pub struct OriginalSyncMessageLikeEvent<C: MessageLikeEventContent> {
pub content: C,
pub event_id: OwnedEventId,
pub sender: OwnedUserId,
pub origin_server_ts: MilliSecondsSinceUnixEpoch,
pub unsigned: MessageLikeUnsigned,
}Available on crate feature
events only.Expand description
An unredacted message-like event without a room_id.
OriginalSyncMessageLikeEvent implements the comparison traits using only the event_id field,
a sorted list would be sorted lexicographically based on the event’s EventId.
Fields
content: CData specific to the event type.
event_id: OwnedEventIdThe globally unique event identifier for the user who sent the event.
sender: OwnedUserIdThe fully-qualified ID of the user who sent this event.
origin_server_ts: MilliSecondsSinceUnixEpochTimestamp in milliseconds on originating homeserver when this event was sent.
unsigned: MessageLikeUnsignedAdditional key-value pairs not signed by the homeserver.
Implementations
sourceimpl<C: MessageLikeEventContent> OriginalSyncMessageLikeEvent<C>
impl<C: MessageLikeEventContent> OriginalSyncMessageLikeEvent<C>
sourcepub fn into_full_event(self, room_id: OwnedRoomId) -> OriginalMessageLikeEvent<C>
pub fn into_full_event(self, room_id: OwnedRoomId) -> OriginalMessageLikeEvent<C>
Convert this sync event into a full event, one with a room_id field.
Trait Implementations
sourceimpl<C: Clone + MessageLikeEventContent> Clone for OriginalSyncMessageLikeEvent<C>
impl<C: Clone + MessageLikeEventContent> Clone for OriginalSyncMessageLikeEvent<C>
sourcefn clone(&self) -> OriginalSyncMessageLikeEvent<C>
fn clone(&self) -> OriginalSyncMessageLikeEvent<C>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl<C: Debug + MessageLikeEventContent> Debug for OriginalSyncMessageLikeEvent<C>
impl<C: Debug + MessageLikeEventContent> Debug for OriginalSyncMessageLikeEvent<C>
sourceimpl<'de, C: MessageLikeEventContent> Deserialize<'de> for OriginalSyncMessageLikeEvent<C>
impl<'de, C: MessageLikeEventContent> Deserialize<'de> for OriginalSyncMessageLikeEvent<C>
sourcefn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<C: MessageLikeEventContent> From<OriginalMessageLikeEvent<C>> for OriginalSyncMessageLikeEvent<C>
impl<C: MessageLikeEventContent> From<OriginalMessageLikeEvent<C>> for OriginalSyncMessageLikeEvent<C>
sourcefn from(event: OriginalMessageLikeEvent<C>) -> Self
fn from(event: OriginalMessageLikeEvent<C>) -> Self
Converts to this type from the input type.
sourceimpl<C: MessageLikeEventContent> Ord for OriginalSyncMessageLikeEvent<C>
impl<C: MessageLikeEventContent> Ord for OriginalSyncMessageLikeEvent<C>
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl<C: MessageLikeEventContent> PartialEq<OriginalSyncMessageLikeEvent<C>> for OriginalSyncMessageLikeEvent<C>
impl<C: MessageLikeEventContent> PartialEq<OriginalSyncMessageLikeEvent<C>> for OriginalSyncMessageLikeEvent<C>
sourceimpl<C: MessageLikeEventContent> PartialOrd<OriginalSyncMessageLikeEvent<C>> for OriginalSyncMessageLikeEvent<C>
impl<C: MessageLikeEventContent> PartialOrd<OriginalSyncMessageLikeEvent<C>> for OriginalSyncMessageLikeEvent<C>
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
Compares EventIds and orders them lexicographically.
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresourceimpl<C: MessageLikeEventContent> Redact for OriginalSyncMessageLikeEvent<C>where
C: RedactContent,
<C as RedactContent>::Redacted: RedactedMessageLikeEventContent,
impl<C: MessageLikeEventContent> Redact for OriginalSyncMessageLikeEvent<C>where
C: RedactContent,
<C as RedactContent>::Redacted: RedactedMessageLikeEventContent,
type Redacted = RedactedSyncMessageLikeEvent<<C as RedactContent>::Redacted>
type Redacted = RedactedSyncMessageLikeEvent<<C as RedactContent>::Redacted>
The redacted form of the event.
sourcefn redact(
self,
redaction: SyncRoomRedactionEvent,
version: &RoomVersionId
) -> Self::Redacted
fn redact(
self,
redaction: SyncRoomRedactionEvent,
version: &RoomVersionId
) -> Self::Redacted
Transforms
self into a redacted form (removing most fields) according to the spec. Read moresourceimpl<C: MessageLikeEventContent> Serialize for OriginalSyncMessageLikeEvent<C>
impl<C: MessageLikeEventContent> Serialize for OriginalSyncMessageLikeEvent<C>
impl<C: MessageLikeEventContent> Eq for OriginalSyncMessageLikeEvent<C>
Auto Trait Implementations
impl<C> RefUnwindSafe for OriginalSyncMessageLikeEvent<C>where
C: RefUnwindSafe,
impl<C> Send for OriginalSyncMessageLikeEvent<C>where
C: Send,
impl<C> Sync for OriginalSyncMessageLikeEvent<C>where
C: Sync,
impl<C> Unpin for OriginalSyncMessageLikeEvent<C>where
C: Unpin,
impl<C> UnwindSafe for OriginalSyncMessageLikeEvent<C>where
C: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.