Struct ruma_common::events::poll::start::PollStartEventContent
source · pub struct PollStartEventContent {
pub poll_start: PollStartContent,
pub message: Option<MessageContent>,
}Available on crate features
events and unstable-msc3381 only.Expand description
The payload for a poll start event.
Fields§
§poll_start: PollStartContentThe poll start content of the message.
message: Option<MessageContent>Optional fallback text representation of the message, for clients that don’t support polls.
Implementations§
source§impl PollStartEventContent
impl PollStartEventContent
sourcepub fn new(poll_start: PollStartContent) -> Self
pub fn new(poll_start: PollStartContent) -> Self
Creates a new PollStartEventContent with the given poll start content.
Trait Implementations§
source§impl Clone for PollStartEventContent
impl Clone for PollStartEventContent
source§fn clone(&self) -> PollStartEventContent
fn clone(&self) -> PollStartEventContent
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 PollStartEventContent
impl Debug for PollStartEventContent
source§impl<'de> Deserialize<'de> for PollStartEventContent
impl<'de> Deserialize<'de> for PollStartEventContent
source§fn 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
source§impl EventContent for PollStartEventContent
impl EventContent for PollStartEventContent
§type EventType = MessageLikeEventType
type EventType = MessageLikeEventType
The Rust enum for the event kind’s known types.
source§fn event_type(&self) -> Self::EventType
fn event_type(&self) -> Self::EventType
Get the event’s type, like
m.room.message.source§impl From<PollStartEventContent> for AnyMessageLikeEventContent
impl From<PollStartEventContent> for AnyMessageLikeEventContent
source§fn from(c: PollStartEventContent) -> Self
fn from(c: PollStartEventContent) -> Self
Converts to this type from the input type.
source§impl RedactContent for PollStartEventContent
impl RedactContent for PollStartEventContent
§type Redacted = RedactedPollStartEventContent
type Redacted = RedactedPollStartEventContent
The redacted form of the event’s content.
source§fn redact(self, version: &RoomVersionId) -> RedactedPollStartEventContent
fn redact(self, version: &RoomVersionId) -> RedactedPollStartEventContent
Transform
self into a redacted form (removing most or all fields) according to the spec. Read more