Struct twitch_irc::login::StaticLoginCredentials
source · pub struct StaticLoginCredentials {
pub credentials: CredentialsPair,
}
Expand description
Simple LoginCredentials
implementation that always returns the same CredentialsPair
and never fails.
Fields§
§credentials: CredentialsPair
The credentials that are always returned.
Implementations§
source§impl StaticLoginCredentials
impl StaticLoginCredentials
sourcepub fn new(login: String, token: Option<String>) -> StaticLoginCredentials
pub fn new(login: String, token: Option<String>) -> StaticLoginCredentials
Create new static login credentials from the given Twitch login name and OAuth access token.
The token
should be without the oauth:
prefix.
sourcepub fn anonymous() -> StaticLoginCredentials
pub fn anonymous() -> StaticLoginCredentials
Creates login credentials for logging into chat as an anonymous user.
Trait Implementations§
source§impl Clone for StaticLoginCredentials
impl Clone for StaticLoginCredentials
source§fn clone(&self) -> StaticLoginCredentials
fn clone(&self) -> StaticLoginCredentials
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for StaticLoginCredentials
impl Debug for StaticLoginCredentials
source§impl<'de> Deserialize<'de> for StaticLoginCredentials
impl<'de> Deserialize<'de> for StaticLoginCredentials
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl LoginCredentials for StaticLoginCredentials
impl LoginCredentials for StaticLoginCredentials
§type Error = Infallible
type Error = Infallible
Error type that can occur when trying to fetch the credentials.
source§fn get_credentials<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<CredentialsPair, Infallible>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_credentials<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<CredentialsPair, Infallible>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Get a fresh set of credentials to be used right-away.
Auto Trait Implementations§
impl RefUnwindSafe for StaticLoginCredentials
impl Send for StaticLoginCredentials
impl Sync for StaticLoginCredentials
impl Unpin for StaticLoginCredentials
impl UnwindSafe for StaticLoginCredentials
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more