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
sourceimpl 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
sourceimpl Clone for PollStartEventContent
impl Clone for PollStartEventContent
sourcefn clone(&self) -> PollStartEventContent
fn clone(&self) -> PollStartEventContent
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 Debug for PollStartEventContent
impl Debug for PollStartEventContent
sourceimpl<'de> Deserialize<'de> for PollStartEventContent
impl<'de> Deserialize<'de> for PollStartEventContent
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 EventContent for PollStartEventContent
impl EventContent for PollStartEventContent
type EventType = MessageLikeEventType
type EventType = MessageLikeEventType
The Rust enum for the event kind’s known types.
sourcefn event_type(&self) -> Self::EventType
fn event_type(&self) -> Self::EventType
Get the event’s type, like
m.room.message.sourceimpl From<PollStartEventContent> for AnyMessageLikeEventContent
impl From<PollStartEventContent> for AnyMessageLikeEventContent
sourcefn from(c: PollStartEventContent) -> Self
fn from(c: PollStartEventContent) -> Self
Converts to this type from the input type.
sourceimpl RedactContent for PollStartEventContent
impl RedactContent for PollStartEventContent
type Redacted = RedactedPollStartEventContent
type Redacted = RedactedPollStartEventContent
The redacted form of the event’s content.
sourcefn 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 moresourceimpl Serialize for PollStartEventContent
impl Serialize for PollStartEventContent
impl MessageLikeEventContent for PollStartEventContent
Auto Trait Implementations
impl RefUnwindSafe for PollStartEventContent
impl Send for PollStartEventContent
impl Sync for PollStartEventContent
impl Unpin for PollStartEventContent
impl UnwindSafe for PollStartEventContent
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
