#[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
§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
§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,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§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