Struct egg_mode::KeyPair [] [src]

pub struct KeyPair<'a> {
    pub key: Cow<'a, str>,
    pub secret: Cow<'a, str>,
}

A key/secret pair representing an OAuth token.

This struct is used as part of the authentication process. You'll need to manually create at least one of these, to hold onto your consumer token.

For more information, see the documentation for Tokens.

Example

let con_token = egg_mode::KeyPair::new("consumer key", "consumer token");

Fields

A key used to identify an application or user.

A private key used to sign messages from an application or user.

Methods

impl<'a> KeyPair<'a>
[src]

Creates a KeyPair with the given key and secret.

This can be called with either &str or String. In the former case the resulting KeyPair will have the same lifetime as the given reference. If two Strings are given, the KeyPair effectively has lifetime 'static.

Trait Implementations

impl<'a> Debug for KeyPair<'a>
[src]

Formats the value using the given formatter.

impl<'a> Clone for KeyPair<'a>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more