Struct ruma::events::voice::VoiceEventContent
source · pub struct VoiceEventContent {
pub message: MessageContent,
pub file: FileContent,
pub audio: AudioContent,
pub voice: VoiceContent,
pub relates_to: Option<Relation<VoiceEventContentWithoutRelation>>,
}
Available on crate features
events
and unstable-msc3245
only.Expand description
Fields§
§message: MessageContent
The text representation of the message.
file: FileContent
The file content of the message.
audio: AudioContent
The audio content of the message.
voice: VoiceContent
The voice content of the message.
relates_to: Option<Relation<VoiceEventContentWithoutRelation>>
Information about related messages.
Implementations§
source§impl VoiceEventContent
impl VoiceEventContent
sourcepub fn plain(message: impl Into<String>, file: FileContent) -> VoiceEventContent
pub fn plain(message: impl Into<String>, file: FileContent) -> VoiceEventContent
Creates a new VoiceEventContent
with the given plain text representation and file.
sourcepub fn with_message(
message: MessageContent,
file: FileContent
) -> VoiceEventContent
pub fn with_message(
message: MessageContent,
file: FileContent
) -> VoiceEventContent
Creates a new VoiceEventContent
with the given message and file.
Trait Implementations§
source§impl Clone for VoiceEventContent
impl Clone for VoiceEventContent
source§fn clone(&self) -> VoiceEventContent
fn clone(&self) -> VoiceEventContent
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for VoiceEventContent
impl Debug for VoiceEventContent
source§impl<'de> Deserialize<'de> for VoiceEventContent
impl<'de> Deserialize<'de> for VoiceEventContent
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<VoiceEventContent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<VoiceEventContent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl EventContent for VoiceEventContent
impl EventContent for VoiceEventContent
§type EventType = MessageLikeEventType
type EventType = MessageLikeEventType
The Rust enum for the event kind’s known types.
source§fn event_type(&self) -> <VoiceEventContent as EventContent>::EventType
fn event_type(&self) -> <VoiceEventContent as EventContent>::EventType
Get the event’s type, like
m.room.message
.source§impl From<VoiceEventContent> for AnyMessageLikeEventContent
impl From<VoiceEventContent> for AnyMessageLikeEventContent
source§fn from(c: VoiceEventContent) -> AnyMessageLikeEventContent
fn from(c: VoiceEventContent) -> AnyMessageLikeEventContent
Converts to this type from the input type.
source§impl From<VoiceEventContent> for VoiceEventContentWithoutRelation
impl From<VoiceEventContent> for VoiceEventContentWithoutRelation
source§fn from(c: VoiceEventContent) -> VoiceEventContentWithoutRelation
fn from(c: VoiceEventContent) -> VoiceEventContentWithoutRelation
Converts to this type from the input type.
source§impl RedactContent for VoiceEventContent
impl RedactContent for VoiceEventContent
§type Redacted = RedactedVoiceEventContent
type Redacted = RedactedVoiceEventContent
The redacted form of the event’s content.
source§fn redact(self, version: &RoomVersionId) -> RedactedVoiceEventContent
fn redact(self, version: &RoomVersionId) -> RedactedVoiceEventContent
Transform
self
into a redacted form (removing most or all fields) according to the spec. Read moresource§impl Serialize for VoiceEventContent
impl Serialize for VoiceEventContent
source§fn 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