pub struct OAuth2Credentials { /* private fields */ }Expand description
An application’s client ID and client secret, which authenticate the token endpoints (D-132).
The secret is never shown in the Debug output. Keep it out of source code; load it from
the environment or a secret store.
discord.js counterpart: none (the client_id and client_secret of a token request).
§Examples
use djs_model::id::ApplicationId;
use djs_rest::oauth2::OAuth2Credentials;
let credentials = OAuth2Credentials::new(ApplicationId::new(1), "client-secret");
assert!(!format!("{credentials:?}").contains("client-secret"));Implementations§
Trait Implementations§
Source§impl Clone for OAuth2Credentials
impl Clone for OAuth2Credentials
Source§impl Debug for OAuth2Credentials
impl Debug for OAuth2Credentials
impl Eq for OAuth2Credentials
Source§impl PartialEq for OAuth2Credentials
impl PartialEq for OAuth2Credentials
impl StructuralPartialEq for OAuth2Credentials
Auto Trait Implementations§
impl Freeze for OAuth2Credentials
impl RefUnwindSafe for OAuth2Credentials
impl Send for OAuth2Credentials
impl Sync for OAuth2Credentials
impl Unpin for OAuth2Credentials
impl UnsafeUnpin for OAuth2Credentials
impl UnwindSafe for OAuth2Credentials
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.