Type Alias ruma_events::poll::start::OriginalSyncPollStartEvent

source ·
pub type OriginalSyncPollStartEvent = OriginalSyncMessageLikeEvent<PollStartEventContent>;
Expand description

An m.poll.start event from a sync_events response.

Aliased Type§

struct OriginalSyncPollStartEvent {
    pub content: PollStartEventContent,
    pub event_id: OwnedEventId,
    pub sender: OwnedUserId,
    pub origin_server_ts: MilliSecondsSinceUnixEpoch,
    pub unsigned: MessageLikeUnsigned<PollStartEventContent>,
}

Fields§

§content: PollStartEventContent

Data specific to the event type.

§event_id: OwnedEventId

The globally unique event identifier for the user who sent the event.

§sender: OwnedUserId

The fully-qualified ID of the user who sent this event.

§origin_server_ts: MilliSecondsSinceUnixEpoch

Timestamp in milliseconds on originating homeserver when this event was sent.

§unsigned: MessageLikeUnsigned<PollStartEventContent>

Additional key-value pairs not signed by the homeserver.

Implementations§

source§

impl OriginalSyncPollStartEvent

source

pub fn compile_results<'a>( &'a self, responses: impl IntoIterator<Item = PollResponseData<'a>>, ) -> PollEndEventContent

Compile the results for this poll with the given response into a PollEndEventContent.

It generates a default text representation of the results in English.

This uses compile_poll_results() internally.