[][src]Struct twitchchat::UserConfigBuilder

pub struct UserConfigBuilder { /* fields omitted */ }

Builder for making a UserConfig

Methods

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

Capabilites cannot be used with this login

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

Capabilities to enable

This will produce an error on build if the name/pass were anonymous

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

Tries to build the UserConfig

This returns an error if the name or token are invalid

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: 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.