[][src]Struct twitchchat::UserConfigBuilder

pub struct UserConfigBuilder { /* fields omitted */ }

Builder for making a UserConfig

Implementations

impl UserConfigBuilder[src]

pub fn name(self, name: impl ToString) -> Self[src]

Name for the connection

pub fn token(self, token: impl ToString) -> Self[src]

Token for the connection

This is an oauth token. It must have atleast two scopes: chat:read, chat:edit

pub fn anonymous(self) -> Self[src]

Uses an anonymous login

This uses "justin1234" as the name and token

pub fn capabilities(self, caps: &[Capability]) -> Self[src]

Capabilities to enable

pub fn enable_all_capabilities(self) -> Self[src]

Enables all of the capabilities.

This is just a shortcut for enabling all of the Capabilities listed here.

pub fn build(self) -> Result<UserConfig, UserConfigError>[src]

Tries to build the UserConfig

This returns an error if the name or token are invalid

If the anonymous name OR token is used without the other matching one this will return an error.

Trait Implementations

impl Debug for UserConfigBuilder[src]

impl Default for UserConfigBuilder[src]

impl<'de> Deserialize<'de> for UserConfigBuilder[src]

impl Serialize for UserConfigBuilder[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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[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.