Enum egg_mode::auth::Token [−][src]
Expand description
A token that can be used to sign requests to Twitter.
Conceptually, a Token represents your authorization to call the Twitter API. It can either be a Bearer token, representing a “logged-out” view of Twitter coming from your app itself; or an Access token, representing a combination of your app’s “consumer” key with a specific user granting access for your app to use the Twitter API on their behalf. For more information, see the authentication documentation.
Once you have obtained a Token of either kind, the keys within may be saved and reused in the future, as long as the access has not been revoked. Note that the keys saved in this type work just like a password, and they should be handled with care when you save them! If you believe your keys have been compromised, you can generate a new consumer token in Twitter’s Apps Dashboard, and if you’ve been using a Bearer token, you should invalidate it and generate a new one.
Variants
An OAuth Access token indicating the request is coming from a specific user.
Show fields
Bearer(String)
An OAuth Bearer token indicating the request is coming from the application itself, not a particular user.
Trait Implementations
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
Auto Trait Implementations
impl RefUnwindSafe for Token
impl UnwindSafe for Token
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self
pub fn vzip(self) -> V