Enum twitch_api2::eventsub::Payload [−][src]
pub enum Payload {}Show variants
VerificationRequest(VerificationRequest), ChannelUpdateV1(NotificationPayload<ChannelUpdateV1>), ChannelFollowV1(NotificationPayload<ChannelFollowV1>), ChannelSubscribeV1(NotificationPayload<ChannelSubscribeV1>), ChannelCheerV1(NotificationPayload<ChannelCheerV1>), ChannelBanV1(NotificationPayload<ChannelBanV1>), ChannelUnbanV1(NotificationPayload<ChannelUnbanV1>), ChannelPointsCustomRewardAddV1(NotificationPayload<ChannelPointsCustomRewardAddV1>), ChannelPointsCustomRewardUpdateV1(NotificationPayload<ChannelPointsCustomRewardUpdateV1>), ChannelPointsCustomRewardRemoveV1(NotificationPayload<ChannelPointsCustomRewardRemoveV1>), ChannelPointsCustomRewardRedemptionAddV1(NotificationPayload<ChannelPointsCustomRewardRedemptionAddV1>), ChannelPointsCustomRewardRedemptionUpdateV1(NotificationPayload<ChannelPointsCustomRewardRedemptionUpdateV1>), ChannelHypeTrainBeginV1(NotificationPayload<ChannelHypeTrainBeginV1>), ChannelHypeTrainProgressV1(NotificationPayload<ChannelHypeTrainProgressV1>), ChannelHypeTrainEndV1(NotificationPayload<ChannelHypeTrainEndV1>), StreamOnlineV1(NotificationPayload<StreamOnlineV1>), StreamOfflineV1(NotificationPayload<StreamOfflineV1>), UserUpdateV1(NotificationPayload<UserUpdateV1>), UserAuthorizationRevokeV1(NotificationPayload<UserAuthorizationRevokeV1>), ChannelRaidV1(NotificationPayload<ChannelRaidV1>),
eventsub
only.Subscription payload. Received on events. Enumerates all possible NotificationPayload
s
Use Payload::parse
to construct
Variants
VerificationRequest(VerificationRequest)
Webhook Callback Verification
ChannelUpdateV1(NotificationPayload<ChannelUpdateV1>)
Channel Update V1 Event
ChannelFollowV1(NotificationPayload<ChannelFollowV1>)
Channel Follow V1 Event
ChannelSubscribeV1(NotificationPayload<ChannelSubscribeV1>)
Channel Subscribe V1 Event
ChannelCheerV1(NotificationPayload<ChannelCheerV1>)
Channel Cheer V1 Event
ChannelBanV1(NotificationPayload<ChannelBanV1>)
Channel Ban V1 Event
ChannelUnbanV1(NotificationPayload<ChannelUnbanV1>)
Channel Unban V1 Event
ChannelPointsCustomRewardAddV1(NotificationPayload<ChannelPointsCustomRewardAddV1>)
Channel Points Custom Reward Add V1 Event
ChannelPointsCustomRewardUpdateV1(NotificationPayload<ChannelPointsCustomRewardUpdateV1>)
Channel Points Custom Reward Update V1 Event
ChannelPointsCustomRewardRemoveV1(NotificationPayload<ChannelPointsCustomRewardRemoveV1>)
Channel Points Custom Reward Remove V1 Event
ChannelPointsCustomRewardRedemptionAddV1(NotificationPayload<ChannelPointsCustomRewardRedemptionAddV1>)
Channel Points Custom Reward Redemption Add V1 Event
ChannelPointsCustomRewardRedemptionUpdateV1(NotificationPayload<ChannelPointsCustomRewardRedemptionUpdateV1>)
Channel Points Custom Reward Redemption Update V1 Event
ChannelHypeTrainBeginV1(NotificationPayload<ChannelHypeTrainBeginV1>)
Channel Hype Train Begin V1 Event
ChannelHypeTrainProgressV1(NotificationPayload<ChannelHypeTrainProgressV1>)
Channel Hype Train Progress V1 Event
ChannelHypeTrainEndV1(NotificationPayload<ChannelHypeTrainEndV1>)
Channel Hype Train End V1 Event
StreamOnlineV1(NotificationPayload<StreamOnlineV1>)
StreamOnline V1 Event
StreamOfflineV1(NotificationPayload<StreamOfflineV1>)
StreamOffline V1 Event
UserUpdateV1(NotificationPayload<UserUpdateV1>)
User Update V1 Event
UserAuthorizationRevokeV1(NotificationPayload<UserAuthorizationRevokeV1>)
User Authorization Revoke V1 Event
ChannelRaidV1(NotificationPayload<ChannelRaidV1>)
Channel Raid V1 Event
Implementations
impl Payload
[src]
impl Payload
[src]pub fn parse(source: &str) -> Result<Payload, PayloadParseError>
[src]
Parse string slice as a Payload
pub fn parse_http(
request: &Request<Vec<u8>>
) -> Result<Payload, PayloadParseError>
[src]
request: &Request<Vec<u8>>
) -> Result<Payload, PayloadParseError>
Parse http post request as a Payload.
pub fn verify_payload(request: &Request<Vec<u8>>, secret: &[u8]) -> bool
[src]
hmac
only.Verify that this payload 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
Trait Implementations
impl<'de> Deserialize<'de> for Payload
[src]
impl<'de> Deserialize<'de> for Payload
[src]fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
[src]
impl StructuralPartialEq for Payload
[src]
impl StructuralPartialEq for Payload
[src]Auto Trait Implementations
impl RefUnwindSafe for Payload
impl RefUnwindSafe for Payload
impl UnwindSafe for Payload
impl UnwindSafe for Payload
Blanket Implementations
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> WithSubscriber for T
[src]
impl<T> WithSubscriber for T
[src]pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,