Struct egg_mode::auth::KeyPair [−][src]
Expand description
A key/secret pair representing the app that is sending a request or an authorization from a user.
This type is used as part of the authentication process and to sign API requests afterward. For
the most part it’s used internally as part of a Token
, but at the very beginning of the
authentication process, you’ll need to manually create one to hold onto your “consumer token”
and request a request token.
For more information, see the authentication documentation.
Example
let con_token = egg_mode::KeyPair::new("consumer key", "consumer token");
Fields
key: Cow<'static, str>
A key used to identify an application or user.
secret: Cow<'static, str>
A private key used to sign messages from an application or user.
Implementations
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 KeyPair
impl UnwindSafe for KeyPair
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