[][src]Enum ttv_pubsub::TopicSubscribe

pub enum TopicSubscribe {
    Listen {
        nonce: Option<String>,
        topics: Vec<String>,
        auth_token: String,
    },
    Unlisten {
        nonce: Option<String>,
        topics: Vec<String>,
        auth_token: String,
    },
}

Message that can be serialized to be sent to twitchs PubSub server to subscribe or unsubscribe to a Topic

Variants

Listen

Subscribe/Listen

Fields of Listen

nonce: Option<String>

Random string to identify the response associated with this request.

topics: Vec<String>

List of topics to listen on.

auth_token: String

OAuth token required to listen on some topics.

Unlisten

Unsubscribe/Unlisten

Fields of Unlisten

nonce: Option<String>

Random string to identify the response associated with this request.

topics: Vec<String>

List of topics to listen on.

auth_token: String

OAuth token required to listen on some topics.

Implementations

impl TopicSubscribe[src]

pub fn to_message(&self) -> Result<String, Error>[src]

Convert this TopicSubscribe to a string which you can send with your client

Trait Implementations

impl Serialize for TopicSubscribe[src]

Auto Trait Implementations

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> From<T> for T[src]

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

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.