#[non_exhaustive]pub enum UnstablePollStartEventContent {
New(NewUnstablePollStartEventContent),
Replacement(ReplacementUnstablePollStartEventContent),
}
Available on crate feature
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§
§impl UnstablePollStartEventContent
impl UnstablePollStartEventContent
pub fn poll_start(&self) -> &UnstablePollStartContentBlock
pub fn poll_start(&self) -> &UnstablePollStartContentBlock
Get the poll start content of this event content.
Trait Implementations§
§impl Clone for UnstablePollStartEventContent
impl Clone for UnstablePollStartEventContent
§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 more§impl Debug for UnstablePollStartEventContent
impl Debug for UnstablePollStartEventContent
§impl<'de> Deserialize<'de> for UnstablePollStartEventContent
impl<'de> Deserialize<'de> for UnstablePollStartEventContent
§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
§impl EventContent for UnstablePollStartEventContent
impl EventContent for UnstablePollStartEventContent
§type EventType = MessageLikeEventType
type EventType = MessageLikeEventType
The Rust enum for the event kind’s known types.
§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
.§impl From<NewUnstablePollStartEventContent> for UnstablePollStartEventContent
impl From<NewUnstablePollStartEventContent> for UnstablePollStartEventContent
§fn from(
value: NewUnstablePollStartEventContent
) -> UnstablePollStartEventContent
fn from( value: NewUnstablePollStartEventContent ) -> UnstablePollStartEventContent
Converts to this type from the input type.
§impl From<ReplacementUnstablePollStartEventContent> for UnstablePollStartEventContent
impl From<ReplacementUnstablePollStartEventContent> for UnstablePollStartEventContent
§fn from(
value: ReplacementUnstablePollStartEventContent
) -> UnstablePollStartEventContent
fn from( value: ReplacementUnstablePollStartEventContent ) -> UnstablePollStartEventContent
Converts to this type from the input type.
§impl From<UnstablePollStartEventContent> for AnyMessageLikeEventContent
impl From<UnstablePollStartEventContent> for AnyMessageLikeEventContent
§fn from(c: UnstablePollStartEventContent) -> AnyMessageLikeEventContent
fn from(c: UnstablePollStartEventContent) -> AnyMessageLikeEventContent
Converts to this type from the input type.
§impl RedactContent for UnstablePollStartEventContent
impl RedactContent for UnstablePollStartEventContent
§type Redacted = RedactedUnstablePollStartEventContent
type Redacted = RedactedUnstablePollStartEventContent
The redacted form of the event’s content.
§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 more§impl Serialize for UnstablePollStartEventContent
impl Serialize for UnstablePollStartEventContent
§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 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