pub enum Event {
Show 33 variants ChannelUpdateV1(Payload<ChannelUpdateV1>), ChannelFollowV1(Payload<ChannelFollowV1>), ChannelSubscribeV1(Payload<ChannelSubscribeV1>), ChannelCheerV1(Payload<ChannelCheerV1>), ChannelBanV1(Payload<ChannelBanV1>), ChannelUnbanV1(Payload<ChannelUnbanV1>), ChannelPointsCustomRewardAddV1(Payload<ChannelPointsCustomRewardAddV1>), ChannelPointsCustomRewardUpdateV1(Payload<ChannelPointsCustomRewardUpdateV1>), ChannelPointsCustomRewardRemoveV1(Payload<ChannelPointsCustomRewardRemoveV1>), ChannelPointsCustomRewardRedemptionAddV1(Payload<ChannelPointsCustomRewardRedemptionAddV1>), ChannelPointsCustomRewardRedemptionUpdateV1(Payload<ChannelPointsCustomRewardRedemptionUpdateV1>), ChannelPollBeginV1(Payload<ChannelPollBeginV1>), ChannelPollProgressV1(Payload<ChannelPollProgressV1>), ChannelPollEndV1(Payload<ChannelPollEndV1>), ChannelPredictionBeginV1(Payload<ChannelPredictionBeginV1>), ChannelPredictionProgressV1(Payload<ChannelPredictionProgressV1>), ChannelPredictionLockV1(Payload<ChannelPredictionLockV1>), ChannelPredictionEndV1(Payload<ChannelPredictionEndV1>), ChannelGoalBeginV1(Payload<ChannelGoalBeginV1>), ChannelGoalProgressV1(Payload<ChannelGoalProgressV1>), ChannelGoalEndV1(Payload<ChannelGoalEndV1>), ChannelHypeTrainBeginV1(Payload<ChannelHypeTrainBeginV1>), ChannelHypeTrainProgressV1(Payload<ChannelHypeTrainProgressV1>), ChannelHypeTrainEndV1(Payload<ChannelHypeTrainEndV1>), StreamOnlineV1(Payload<StreamOnlineV1>), StreamOfflineV1(Payload<StreamOfflineV1>), UserUpdateV1(Payload<UserUpdateV1>), UserAuthorizationGrantV1(Payload<UserAuthorizationGrantV1>), UserAuthorizationRevokeV1(Payload<UserAuthorizationRevokeV1>), ChannelRaidV1(Payload<ChannelRaidV1>), ChannelSubscriptionEndV1(Payload<ChannelSubscriptionEndV1>), ChannelSubscriptionGiftV1(Payload<ChannelSubscriptionGiftV1>), ChannelSubscriptionMessageV1(Payload<ChannelSubscriptionMessageV1>),
}
Available on crate feature eventsub only.
Expand description

A notification with an event payload. Enumerates all possible Payloads

Parse with Event::parse or parse the whole http request your server receives with Payload::parse_http

Variants

ChannelUpdateV1(Payload<ChannelUpdateV1>)

Channel Update V1 Event

ChannelFollowV1(Payload<ChannelFollowV1>)

Channel Follow V1 Event

ChannelSubscribeV1(Payload<ChannelSubscribeV1>)

Channel Subscribe V1 Event

ChannelCheerV1(Payload<ChannelCheerV1>)

Channel Cheer V1 Event

ChannelBanV1(Payload<ChannelBanV1>)

Channel Ban V1 Event

ChannelUnbanV1(Payload<ChannelUnbanV1>)

Channel Unban V1 Event

ChannelPointsCustomRewardAddV1(Payload<ChannelPointsCustomRewardAddV1>)

Channel Points Custom Reward Add V1 Event

ChannelPointsCustomRewardUpdateV1(Payload<ChannelPointsCustomRewardUpdateV1>)

Channel Points Custom Reward Update V1 Event

ChannelPointsCustomRewardRemoveV1(Payload<ChannelPointsCustomRewardRemoveV1>)

Channel Points Custom Reward Remove V1 Event

ChannelPointsCustomRewardRedemptionAddV1(Payload<ChannelPointsCustomRewardRedemptionAddV1>)

Channel Points Custom Reward Redemption Add V1 Event

ChannelPointsCustomRewardRedemptionUpdateV1(Payload<ChannelPointsCustomRewardRedemptionUpdateV1>)

Channel Points Custom Reward Redemption Update V1 Event

ChannelPollBeginV1(Payload<ChannelPollBeginV1>)

Channel Poll Begin V1 Event

ChannelPollProgressV1(Payload<ChannelPollProgressV1>)

Channel Poll Progress V1 Event

ChannelPollEndV1(Payload<ChannelPollEndV1>)

Channel Poll End V1 Event

ChannelPredictionBeginV1(Payload<ChannelPredictionBeginV1>)

Channel Prediction Begin V1 Event

ChannelPredictionProgressV1(Payload<ChannelPredictionProgressV1>)

Channel Prediction Progress V1 Event

ChannelPredictionLockV1(Payload<ChannelPredictionLockV1>)

Channel Prediction Lock V1 Event

ChannelPredictionEndV1(Payload<ChannelPredictionEndV1>)

Channel Prediction End V1 Event

ChannelGoalBeginV1(Payload<ChannelGoalBeginV1>)

Channel Goal Begin V1 Event

ChannelGoalProgressV1(Payload<ChannelGoalProgressV1>)

Channel Goal Progress V1 Event

ChannelGoalEndV1(Payload<ChannelGoalEndV1>)

Channel Goal End V1 Event

ChannelHypeTrainBeginV1(Payload<ChannelHypeTrainBeginV1>)

Channel Hype Train Begin V1 Event

ChannelHypeTrainProgressV1(Payload<ChannelHypeTrainProgressV1>)

Channel Hype Train Progress V1 Event

ChannelHypeTrainEndV1(Payload<ChannelHypeTrainEndV1>)

Channel Hype Train End V1 Event

StreamOnlineV1(Payload<StreamOnlineV1>)

StreamOnline V1 Event

StreamOfflineV1(Payload<StreamOfflineV1>)

StreamOffline V1 Event

UserUpdateV1(Payload<UserUpdateV1>)

User Update V1 Event

UserAuthorizationGrantV1(Payload<UserAuthorizationGrantV1>)

User Authorization Grant V1 Event

UserAuthorizationRevokeV1(Payload<UserAuthorizationRevokeV1>)

User Authorization Revoke V1 Event

ChannelRaidV1(Payload<ChannelRaidV1>)

Channel Raid V1 Event

ChannelSubscriptionEndV1(Payload<ChannelSubscriptionEndV1>)

Channel Subscription End V1 Event

ChannelSubscriptionGiftV1(Payload<ChannelSubscriptionGiftV1>)

Channel Subscription Gift V1 Event

ChannelSubscriptionMessageV1(Payload<ChannelSubscriptionMessageV1>)

Channel Subscription Message V1 Event

Implementations

Parse string slice as an Event. Consider using Event::parse_http instead.

Returns true if the message in the Payload is Revocation.

Returns true if the message in the Payload is Revocation.

Returns true if the message in the Payload is Revocation.

If this event is a VerificationRequest, return the VerificationRequest message, including the message.

Make a EventSubSubscription from this notification.

Available on crate feature hmac only.

Verify that this event is authentic using HMAC-SHA256.

HMAC key is secret, HMAC message is a concatenation of Twitch-Eventsub-Message-Id header, Twitch-Eventsub-Message-Timestamp header and the request body. HMAC signature is Twitch-Eventsub-Message-Signature header.

Parse a http payload as an Event

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more