#[non_exhaustive]pub enum UnstablePollStartEventContent {
New(NewUnstablePollStartEventContent),
Replacement(ReplacementUnstablePollStartEventContent),
}
Expand description
The payload for an unstable poll start event.
This is the event content that should be sent for room versions that don’t support extensible events. As of Matrix 1.7, none of the stable room versions (1 through 10) support extensible events.
To send a poll start event for a room version that supports extensible events, use
PollStartEventContent
.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
New(NewUnstablePollStartEventContent)
A new poll start event.
Replacement(ReplacementUnstablePollStartEventContent)
A replacement poll start event.
Implementations§
Source§impl UnstablePollStartEventContent
impl UnstablePollStartEventContent
Sourcepub fn poll_start(&self) -> &UnstablePollStartContentBlock
pub fn poll_start(&self) -> &UnstablePollStartContentBlock
Get the poll start content of this event content.
Trait Implementations§
Source§impl Clone for UnstablePollStartEventContent
impl Clone for UnstablePollStartEventContent
Source§fn clone(&self) -> UnstablePollStartEventContent
fn clone(&self) -> UnstablePollStartEventContent
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<'de> Deserialize<'de> for UnstablePollStartEventContent
impl<'de> Deserialize<'de> for UnstablePollStartEventContent
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 UnstablePollStartEventContent
impl EventContent for UnstablePollStartEventContent
Source§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<NewUnstablePollStartEventContent> for UnstablePollStartEventContent
impl From<NewUnstablePollStartEventContent> for UnstablePollStartEventContent
Source§fn from(value: NewUnstablePollStartEventContent) -> Self
fn from(value: NewUnstablePollStartEventContent) -> Self
Converts to this type from the input type.
Source§impl From<ReplacementUnstablePollStartEventContent> for UnstablePollStartEventContent
impl From<ReplacementUnstablePollStartEventContent> for UnstablePollStartEventContent
Source§fn from(value: ReplacementUnstablePollStartEventContent) -> Self
fn from(value: ReplacementUnstablePollStartEventContent) -> Self
Converts to this type from the input type.
Source§impl From<UnstablePollStartEventContent> for AnyMessageLikeEventContent
impl From<UnstablePollStartEventContent> for AnyMessageLikeEventContent
Source§fn from(c: UnstablePollStartEventContent) -> Self
fn from(c: UnstablePollStartEventContent) -> Self
Converts to this type from the input type.
impl MessageLikeEventContent for UnstablePollStartEventContent
Auto Trait Implementations§
impl Freeze for UnstablePollStartEventContent
impl RefUnwindSafe for UnstablePollStartEventContent
impl Send for UnstablePollStartEventContent
impl Sync for UnstablePollStartEventContent
impl Unpin for UnstablePollStartEventContent
impl UnwindSafe for UnstablePollStartEventContent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more