Struct twitch_api2::helix::webhooks::hub::WebhookHubBody[][src]

#[non_exhaustive]pub struct WebhookHubBody<T: Topic> {
    pub callback: String,
    pub mode: WebhookSubscriptionMode,
    pub topic: T,
    pub lease_seconds: u32,
    pub secret: Option<String>,
}
This is supported on crate feature helix only.

Body Parameters for Subscribe to/Unsubscribe From Events

subscribe-tounsubscribe-from-events

Notes

This body is quite different from the official body. If you want the true representation in text, see helix::RequestPost::body on WebhookHubRequest<T: Topic>

Fields (Non-exhaustive)

Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct {{ .. }} syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
callback: String

URL where notifications will be delivered.

mode: WebhookSubscriptionMode

Type of request. Valid values: subscribe, unsubscribe

topic: T

URL for the topic to subscribe to or unsubscribe from. topic maps to a new Twitch API endpoint.

lease_seconds: u32

Number of seconds until the subscription expires. Default: 0. Maximum: 864000.

secret: Option<String>

Secret used to sign notification payloads

Implementations

impl<T: Topic> WebhookHubBody<T>[src]

pub fn builder() -> WebhookHubBodyBuilder<((), (), (), (), ()), T>[src]

Create a builder for building WebhookHubBody. On the builder, call .callback(...), .mode(...), .topic(...), .lease_seconds(...), .secret(...) to set the values of the fields. Finally, call .build() to create the instance of WebhookHubBody.

Trait Implementations

impl<T: Clone + Topic> Clone for WebhookHubBody<T>[src]

impl<T: Debug + Topic> Debug for WebhookHubBody<T>[src]

impl<'de, T: Topic> Deserialize<'de> for WebhookHubBody<T> where
    T: Topic
[src]

impl<T: PartialEq + Topic> PartialEq<WebhookHubBody<T>> for WebhookHubBody<T>[src]

impl<T: Topic> Serialize for WebhookHubBody<T> where
    T: Topic
[src]

impl<T: Topic> StructuralPartialEq for WebhookHubBody<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for WebhookHubBody<T> where
    T: RefUnwindSafe
[src]

impl<T> Send for WebhookHubBody<T> where
    T: Send
[src]

impl<T> Sync for WebhookHubBody<T> where
    T: Sync
[src]

impl<T> Unpin for WebhookHubBody<T> where
    T: Unpin
[src]

impl<T> UnwindSafe for WebhookHubBody<T> where
    T: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]