#[non_exhaustive]pub enum UnstablePollStartEventContent {
New(NewUnstablePollStartEventContent),
Replacement(ReplacementUnstablePollStartEventContent),
}
Available on crate features
events
and unstable-msc3381
only.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<UnstablePollStartEventContent, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<UnstablePollStartEventContent, <D as Deserializer<'de>>::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,
) -> <UnstablePollStartEventContent as EventContent>::EventType
fn event_type( &self, ) -> <UnstablePollStartEventContent as EventContent>::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,
) -> UnstablePollStartEventContent
fn from( value: NewUnstablePollStartEventContent, ) -> UnstablePollStartEventContent
Converts to this type from the input type.
Source§impl From<ReplacementUnstablePollStartEventContent> for UnstablePollStartEventContent
impl From<ReplacementUnstablePollStartEventContent> for UnstablePollStartEventContent
Source§fn from(
value: ReplacementUnstablePollStartEventContent,
) -> UnstablePollStartEventContent
fn from( value: ReplacementUnstablePollStartEventContent, ) -> UnstablePollStartEventContent
Converts to this type from the input type.
Source§impl From<UnstablePollStartEventContent> for AnyMessageLikeEventContent
impl From<UnstablePollStartEventContent> for AnyMessageLikeEventContent
Source§fn from(c: UnstablePollStartEventContent) -> AnyMessageLikeEventContent
fn from(c: UnstablePollStartEventContent) -> AnyMessageLikeEventContent
Converts to this type from the input type.
Source§impl RedactContent for UnstablePollStartEventContent
impl RedactContent for UnstablePollStartEventContent
Source§type Redacted = RedactedUnstablePollStartEventContent
type Redacted = RedactedUnstablePollStartEventContent
The redacted form of the event’s content.
Source§fn redact(
self,
_version: &RoomVersionId,
) -> <UnstablePollStartEventContent as RedactContent>::Redacted
fn redact( self, _version: &RoomVersionId, ) -> <UnstablePollStartEventContent as RedactContent>::Redacted
Transform
self
into a redacted form (removing most or all fields) according to the spec. Read moreSource§impl Serialize for UnstablePollStartEventContent
impl Serialize for UnstablePollStartEventContent
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
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