pub struct OAuthData {
pub client_id: ClientId,
pub token: Option<Token>,
pub signature_method: SignatureMethod,
pub nonce: Nonce,
}
Expand description
The main entrypoint to the API. Non-sensitive data required for all authenticated requests.
Fields§
§client_id: ClientId
The client ID.
token: Option<Token>
The OAuth token.
signature_method: SignatureMethod
The signature method.
nonce: Nonce
The nonce.
Implementations§
Source§impl OAuthData
impl OAuthData
Generate an HTTP Authorization header.
Sourcepub fn parameters(&self) -> BTreeMap<String, String>
pub fn parameters(&self) -> BTreeMap<String, String>
Get the OAuth parameters.
Sourcepub fn regen_nonce(&mut self)
pub fn regen_nonce(&mut self)
Regenerate the nonce. This should be done at least between each identical request made within a second.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for OAuthData
impl<'de> Deserialize<'de> for OAuthData
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
Source§impl Ord for OAuthData
impl Ord for OAuthData
Source§impl PartialOrd for OAuthData
impl PartialOrd for OAuthData
impl Eq for OAuthData
impl StructuralPartialEq for OAuthData
Auto Trait Implementations§
impl Freeze for OAuthData
impl RefUnwindSafe for OAuthData
impl Send for OAuthData
impl Sync for OAuthData
impl Unpin for OAuthData
impl UnwindSafe for OAuthData
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