pub struct StaticLoginCredentials {
pub credentials: CredentialsPair,
}Expand description
Simple LoginCredentials implementation that always returns the same CredentialsPair
and never fails.
Fields§
§credentials: CredentialsPairThe 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 duplicate of the value. Read more
1.0.0 (const: unstable) · 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
Source§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 Freeze for StaticLoginCredentials
impl RefUnwindSafe for StaticLoginCredentials
impl Send for StaticLoginCredentials
impl Sync for StaticLoginCredentials
impl Unpin for StaticLoginCredentials
impl UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more