#[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§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> CompatExt for T
impl<T> CompatExt for T
Source§impl<T> EventContentFromType for Twhere
T: EventContent + DeserializeOwned,
impl<T> EventContentFromType for Twhere
T: EventContent + DeserializeOwned,
Source§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
Source§fn consume_handle(handle: Handle) -> Arc<T>
fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<>
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more