Struct egg_mode::Token [] [src]

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

A key/secret pair representing an OAuth token.

Fields

key: Cow<'a, str>

A key used to identify an application or user.

secret: Cow<'a, str>

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

Methods

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

fn new<K, S>(key: K, secret: S) -> Token<'a> where K: Into<Cow<'a, str>>, S: Into<Cow<'a, str>>

Creates a Token with the given key and secret.

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