Struct ruma::events::OriginalSyncMessageLikeEvent
source · [−]pub struct OriginalSyncMessageLikeEvent<C>where
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: C
Data specific to the event type.
event_id: OwnedEventId
The globally unique event identifier for the user who sent the event.
sender: OwnedUserId
The fully-qualified ID of the user who sent this event.
origin_server_ts: MilliSecondsSinceUnixEpoch
Timestamp in milliseconds on originating homeserver when this event was sent.
unsigned: MessageLikeUnsigned
Additional key-value pairs not signed by the homeserver.
Implementations
sourceimpl<C> OriginalSyncMessageLikeEvent<C>where
C: MessageLikeEventContent,
impl<C> OriginalSyncMessageLikeEvent<C>where
C: MessageLikeEventContent,
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 for OriginalSyncMessageLikeEvent<C>where
C: Clone + MessageLikeEventContent,
impl<C> Clone for OriginalSyncMessageLikeEvent<C>where
C: Clone + MessageLikeEventContent,
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 for OriginalSyncMessageLikeEvent<C>where
C: Debug + MessageLikeEventContent,
impl<C> Debug for OriginalSyncMessageLikeEvent<C>where
C: Debug + MessageLikeEventContent,
sourceimpl<'de, C> Deserialize<'de> for OriginalSyncMessageLikeEvent<C>where
C: MessageLikeEventContent,
impl<'de, C> Deserialize<'de> for OriginalSyncMessageLikeEvent<C>where
C: MessageLikeEventContent,
sourcefn deserialize<D>(
deserializer: D
) -> Result<OriginalSyncMessageLikeEvent<C>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<OriginalSyncMessageLikeEvent<C>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<C> From<OriginalMessageLikeEvent<C>> for OriginalSyncMessageLikeEvent<C>where
C: MessageLikeEventContent,
impl<C> From<OriginalMessageLikeEvent<C>> for OriginalSyncMessageLikeEvent<C>where
C: MessageLikeEventContent,
sourcefn from(event: OriginalMessageLikeEvent<C>) -> OriginalSyncMessageLikeEvent<C>
fn from(event: OriginalMessageLikeEvent<C>) -> OriginalSyncMessageLikeEvent<C>
Converts to this type from the input type.
sourceimpl<C> Ord for OriginalSyncMessageLikeEvent<C>where
C: MessageLikeEventContent,
impl<C> Ord for OriginalSyncMessageLikeEvent<C>where
C: MessageLikeEventContent,
sourcefn cmp(&self, other: &OriginalSyncMessageLikeEvent<C>) -> Ordering
fn cmp(&self, other: &OriginalSyncMessageLikeEvent<C>) -> Ordering
Compares EventId
s and orders them lexicographically.
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> PartialEq<OriginalSyncMessageLikeEvent<C>> for OriginalSyncMessageLikeEvent<C>where
C: MessageLikeEventContent,
impl<C> PartialEq<OriginalSyncMessageLikeEvent<C>> for OriginalSyncMessageLikeEvent<C>where
C: MessageLikeEventContent,
sourceimpl<C> PartialOrd<OriginalSyncMessageLikeEvent<C>> for OriginalSyncMessageLikeEvent<C>where
C: MessageLikeEventContent,
impl<C> PartialOrd<OriginalSyncMessageLikeEvent<C>> for OriginalSyncMessageLikeEvent<C>where
C: MessageLikeEventContent,
sourcefn partial_cmp(
&self,
other: &OriginalSyncMessageLikeEvent<C>
) -> Option<Ordering>
fn partial_cmp(
&self,
other: &OriginalSyncMessageLikeEvent<C>
) -> Option<Ordering>
Compares EventId
s 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> Redact for OriginalSyncMessageLikeEvent<C>where
C: MessageLikeEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedMessageLikeEventContent,
impl<C> Redact for OriginalSyncMessageLikeEvent<C>where
C: MessageLikeEventContent + 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
) -> <OriginalSyncMessageLikeEvent<C> as Redact>::Redacted
fn redact(
self,
redaction: SyncRoomRedactionEvent,
version: &RoomVersionId
) -> <OriginalSyncMessageLikeEvent<C> as Redact>::Redacted
Transforms
self
into a redacted form (removing most fields) according to the spec. Read moresourceimpl<C> Serialize for OriginalSyncMessageLikeEvent<C>where
C: MessageLikeEventContent,
impl<C> Serialize for OriginalSyncMessageLikeEvent<C>where
C: MessageLikeEventContent,
sourcefn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<C> Eq for OriginalSyncMessageLikeEvent<C>where
C: MessageLikeEventContent,
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.