pub struct KeyPair {
pub key: Cow<'static, str>,
pub secret: Cow<'static, str>,
}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§
Source§impl<'de> Deserialize<'de> for KeyPair
impl<'de> Deserialize<'de> for KeyPair
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
Auto Trait Implementations§
impl Freeze for KeyPair
impl RefUnwindSafe for KeyPair
impl Send for KeyPair
impl Sync for KeyPair
impl Unpin for KeyPair
impl UnwindSafe for KeyPair
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