pub enum AnyMessageLikeEventContent {
Show 31 variants Audio(AudioEventContent), CallAnswer(CallAnswerEventContent), CallInvite(CallInviteEventContent), CallHangup(CallHangupEventContent), CallCandidates(CallCandidatesEventContent), CallNegotiate(CallNegotiateEventContent), CallReject(CallRejectEventContent), CallSelectAnswer(CallSelectAnswerEventContent), Emote(EmoteEventContent), File(FileEventContent), Image(ImageEventContent), KeyVerificationReady(KeyVerificationReadyEventContent), KeyVerificationStart(KeyVerificationStartEventContent), KeyVerificationCancel(KeyVerificationCancelEventContent), KeyVerificationAccept(KeyVerificationAcceptEventContent), KeyVerificationKey(KeyVerificationKeyEventContent), KeyVerificationMac(KeyVerificationMacEventContent), KeyVerificationDone(KeyVerificationDoneEventContent), Location(LocationEventContent), Message(MessageEventContent), Notice(NoticeEventContent), PollStart(PollStartEventContent), PollResponse(PollResponseEventContent), PollEnd(PollEndEventContent), Reaction(ReactionEventContent), RoomEncrypted(RoomEncryptedEventContent), RoomMessage(RoomMessageEventContent), RoomRedaction(RoomRedactionEventContent), Sticker(StickerEventContent), Video(VideoEventContent), Voice(VoiceEventContent), // some variants omitted
}
Available on crate feature events only.
Expand description

Any message-like event.

Variants§

§

Audio(AudioEventContent)

Available on crate feature unstable-msc3246 only.

m.audio

§

CallAnswer(CallAnswerEventContent)

m.call.answer

§

CallInvite(CallInviteEventContent)

m.call.invite

§

CallHangup(CallHangupEventContent)

m.call.hangup

§

CallCandidates(CallCandidatesEventContent)

m.call.candidates

§

CallNegotiate(CallNegotiateEventContent)

Available on crate feature unstable-msc2746 only.

m.call.negotiate

§

CallReject(CallRejectEventContent)

Available on crate feature unstable-msc2746 only.

m.call.reject

§

CallSelectAnswer(CallSelectAnswerEventContent)

Available on crate feature unstable-msc2746 only.

m.call.select_answer

§

Emote(EmoteEventContent)

Available on crate feature unstable-msc1767 only.

m.emote

§

File(FileEventContent)

Available on crate feature unstable-msc3551 only.

m.file

§

Image(ImageEventContent)

Available on crate feature unstable-msc3552 only.

m.image

§

KeyVerificationReady(KeyVerificationReadyEventContent)

m.key.verification.ready

§

KeyVerificationStart(KeyVerificationStartEventContent)

m.key.verification.start

§

KeyVerificationCancel(KeyVerificationCancelEventContent)

m.key.verification.cancel

§

KeyVerificationAccept(KeyVerificationAcceptEventContent)

m.key.verification.accept

§

KeyVerificationKey(KeyVerificationKeyEventContent)

m.key.verification.key

§

KeyVerificationMac(KeyVerificationMacEventContent)

m.key.verification.mac

§

KeyVerificationDone(KeyVerificationDoneEventContent)

m.key.verification.done

§

Location(LocationEventContent)

Available on crate feature unstable-msc3488 only.

m.location

§

Message(MessageEventContent)

Available on crate feature unstable-msc1767 only.

m.message

§

Notice(NoticeEventContent)

Available on crate feature unstable-msc1767 only.

m.notice

§

PollStart(PollStartEventContent)

Available on crate feature unstable-msc3381 only.

m.poll.start

This variant uses the unstable type org.matrix.msc3381.poll.start.

This variant can also be deserialized from the m.poll.start type.

§

PollResponse(PollResponseEventContent)

Available on crate feature unstable-msc3381 only.

m.poll.response

This variant uses the unstable type org.matrix.msc3381.poll.response.

This variant can also be deserialized from the m.poll.response type.

§

PollEnd(PollEndEventContent)

Available on crate feature unstable-msc3381 only.

m.poll.end

This variant uses the unstable type org.matrix.msc3381.poll.end.

This variant can also be deserialized from the m.poll.end type.

§

Reaction(ReactionEventContent)

Available on crate feature unstable-msc2677 only.

m.reaction

§

RoomEncrypted(RoomEncryptedEventContent)

m.room.encrypted

§

RoomMessage(RoomMessageEventContent)

m.room.message

§

RoomRedaction(RoomRedactionEventContent)

m.room.redaction

§

Sticker(StickerEventContent)

m.sticker

§

Video(VideoEventContent)

Available on crate feature unstable-msc3553 only.

m.video

§

Voice(VoiceEventContent)

Available on crate feature unstable-msc3245 only.

m.voice

Implementations§

source§

impl AnyMessageLikeEventContent

source

pub fn relation(&self) -> Option<Relation>

Get a copy of the event’s m.relates_to field, if any.

This is a helper function intended for encryption. There should not be a reason to access m.relates_to without first destructuring an AnyMessageLikeEventContent otherwise.

Trait Implementations§

source§

impl Clone for AnyMessageLikeEventContent

source§

fn clone(&self) -> AnyMessageLikeEventContent

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for AnyMessageLikeEventContent

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl EventContent for AnyMessageLikeEventContent

§

type EventType = MessageLikeEventType

The Rust enum for the event kind’s known types.
source§

fn event_type(&self) -> <AnyMessageLikeEventContent as EventContent>::EventType

Get the event’s type, like m.room.message.
source§

impl From<AudioEventContent> for AnyMessageLikeEventContent

Available on crate feature unstable-msc3246 only.
source§

fn from(c: AudioEventContent) -> AnyMessageLikeEventContent

Converts to this type from the input type.
source§

impl From<CallAnswerEventContent> for AnyMessageLikeEventContent

source§

fn from(c: CallAnswerEventContent) -> AnyMessageLikeEventContent

Converts to this type from the input type.
source§

impl From<CallCandidatesEventContent> for AnyMessageLikeEventContent

source§

fn from(c: CallCandidatesEventContent) -> AnyMessageLikeEventContent

Converts to this type from the input type.
source§

impl From<CallHangupEventContent> for AnyMessageLikeEventContent

source§

fn from(c: CallHangupEventContent) -> AnyMessageLikeEventContent

Converts to this type from the input type.
source§

impl From<CallInviteEventContent> for AnyMessageLikeEventContent

source§

fn from(c: CallInviteEventContent) -> AnyMessageLikeEventContent

Converts to this type from the input type.
source§

impl From<CallNegotiateEventContent> for AnyMessageLikeEventContent

Available on crate feature unstable-msc2746 only.
source§

fn from(c: CallNegotiateEventContent) -> AnyMessageLikeEventContent

Converts to this type from the input type.
source§

impl From<CallRejectEventContent> for AnyMessageLikeEventContent

Available on crate feature unstable-msc2746 only.
source§

fn from(c: CallRejectEventContent) -> AnyMessageLikeEventContent

Converts to this type from the input type.
source§

impl From<CallSelectAnswerEventContent> for AnyMessageLikeEventContent

Available on crate feature unstable-msc2746 only.
source§

fn from(c: CallSelectAnswerEventContent) -> AnyMessageLikeEventContent

Converts to this type from the input type.
source§

impl From<EmoteEventContent> for AnyMessageLikeEventContent

Available on crate feature unstable-msc1767 only.
source§

fn from(c: EmoteEventContent) -> AnyMessageLikeEventContent

Converts to this type from the input type.
source§

impl From<FileEventContent> for AnyMessageLikeEventContent

Available on crate feature unstable-msc3551 only.
source§

fn from(c: FileEventContent) -> AnyMessageLikeEventContent

Converts to this type from the input type.
source§

impl From<ImageEventContent> for AnyMessageLikeEventContent

Available on crate feature unstable-msc3552 only.
source§

fn from(c: ImageEventContent) -> AnyMessageLikeEventContent

Converts to this type from the input type.
source§

impl From<KeyVerificationAcceptEventContent> for AnyMessageLikeEventContent

source§

fn from(c: KeyVerificationAcceptEventContent) -> AnyMessageLikeEventContent

Converts to this type from the input type.
source§

impl From<KeyVerificationCancelEventContent> for AnyMessageLikeEventContent

source§

fn from(c: KeyVerificationCancelEventContent) -> AnyMessageLikeEventContent

Converts to this type from the input type.
source§

impl From<KeyVerificationDoneEventContent> for AnyMessageLikeEventContent

source§

fn from(c: KeyVerificationDoneEventContent) -> AnyMessageLikeEventContent

Converts to this type from the input type.
source§

impl From<KeyVerificationKeyEventContent> for AnyMessageLikeEventContent

source§

fn from(c: KeyVerificationKeyEventContent) -> AnyMessageLikeEventContent

Converts to this type from the input type.
source§

impl From<KeyVerificationMacEventContent> for AnyMessageLikeEventContent

source§

fn from(c: KeyVerificationMacEventContent) -> AnyMessageLikeEventContent

Converts to this type from the input type.
source§

impl From<KeyVerificationReadyEventContent> for AnyMessageLikeEventContent

source§

fn from(c: KeyVerificationReadyEventContent) -> AnyMessageLikeEventContent

Converts to this type from the input type.
source§

impl From<KeyVerificationStartEventContent> for AnyMessageLikeEventContent

source§

fn from(c: KeyVerificationStartEventContent) -> AnyMessageLikeEventContent

Converts to this type from the input type.
source§

impl From<LocationEventContent> for AnyMessageLikeEventContent

Available on crate feature unstable-msc3488 only.
source§

fn from(c: LocationEventContent) -> AnyMessageLikeEventContent

Converts to this type from the input type.
source§

impl From<MessageEventContent> for AnyMessageLikeEventContent

Available on crate feature unstable-msc1767 only.
source§

fn from(c: MessageEventContent) -> AnyMessageLikeEventContent

Converts to this type from the input type.
source§

impl From<NoticeEventContent> for AnyMessageLikeEventContent

Available on crate feature unstable-msc1767 only.
source§

fn from(c: NoticeEventContent) -> AnyMessageLikeEventContent

Converts to this type from the input type.
source§

impl From<PollEndEventContent> for AnyMessageLikeEventContent

Available on crate feature unstable-msc3381 only.
source§

fn from(c: PollEndEventContent) -> AnyMessageLikeEventContent

Converts to this type from the input type.
source§

impl From<PollResponseEventContent> for AnyMessageLikeEventContent

Available on crate feature unstable-msc3381 only.
source§

fn from(c: PollResponseEventContent) -> AnyMessageLikeEventContent

Converts to this type from the input type.
source§

impl From<PollStartEventContent> for AnyMessageLikeEventContent

Available on crate feature unstable-msc3381 only.
source§

fn from(c: PollStartEventContent) -> AnyMessageLikeEventContent

Converts to this type from the input type.
source§

impl From<ReactionEventContent> for AnyMessageLikeEventContent

Available on crate feature unstable-msc2677 only.
source§

fn from(c: ReactionEventContent) -> AnyMessageLikeEventContent

Converts to this type from the input type.
source§

impl From<RoomEncryptedEventContent> for AnyMessageLikeEventContent

source§

fn from(c: RoomEncryptedEventContent) -> AnyMessageLikeEventContent

Converts to this type from the input type.
source§

impl From<RoomMessageEventContent> for AnyMessageLikeEventContent

source§

fn from(c: RoomMessageEventContent) -> AnyMessageLikeEventContent

Converts to this type from the input type.
source§

impl From<RoomRedactionEventContent> for AnyMessageLikeEventContent

source§

fn from(c: RoomRedactionEventContent) -> AnyMessageLikeEventContent

Converts to this type from the input type.
source§

impl From<StickerEventContent> for AnyMessageLikeEventContent

source§

fn from(c: StickerEventContent) -> AnyMessageLikeEventContent

Converts to this type from the input type.
source§

impl From<VideoEventContent> for AnyMessageLikeEventContent

Available on crate feature unstable-msc3553 only.
source§

fn from(c: VideoEventContent) -> AnyMessageLikeEventContent

Converts to this type from the input type.
source§

impl From<VoiceEventContent> for AnyMessageLikeEventContent

Available on crate feature unstable-msc3245 only.
source§

fn from(c: VoiceEventContent) -> AnyMessageLikeEventContent

Converts to this type from the input type.
source§

impl Serialize for AnyMessageLikeEventContent

source§

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
source§

impl MessageLikeEventContent for AnyMessageLikeEventContent

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere
    T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere
    T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere
    T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere
    U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere
    T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere
    U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere
    U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere
    V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
    S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
    S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more