[][src]Struct twitchchat::UserConfigBuilder

pub struct UserConfigBuilder { /* fields omitted */ }

A builder type to create a UserConfig without dumb errors (like swapping nick/token)

Methods

impl UserConfigBuilder[src]

pub fn new() -> Self[src]

pub fn nick<S: ToString>(self, nick: S) -> Self[src]

Use this nickname in the configuration

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

Use this oauth token in the configuration

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

Enable or disable the membership capability

Disabled by default

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

Enable or disable the commands capability

Disabled by default

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

Enable or disable the tags capability

Disabled by default

pub fn build(self) -> Option<UserConfig>[src]

Build the UserConfig

Returns None if nick or token are invalid

Trait Implementations

impl Default for UserConfigBuilder[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> From<T> for 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.

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

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

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