pub struct CurrentAuthorizationInformation {
pub application: Application,
pub expires: Timestamp,
pub scopes: Vec<String>,
pub user: Option<User>,
}
Expand description
Information about the current OAuth2 authorization.
Requires authentication with a bearer token to make the request necessary to retrieve this.
Refer to Discord Docs/Get Current Authorization Information for more information.
Fields§
§application: Application
Current application.
expires: Timestamp
When the access token expires.
scopes: Vec<String>
List of scopes the user
has authorized the application
for.
user: Option<User>
User who has authorized, if the user has authorized with the
IDENTIFY
scope.
Trait Implementations§
source§impl Clone for CurrentAuthorizationInformation
impl Clone for CurrentAuthorizationInformation
source§fn clone(&self) -> CurrentAuthorizationInformation
fn clone(&self) -> CurrentAuthorizationInformation
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'de> Deserialize<'de> for CurrentAuthorizationInformation
impl<'de> Deserialize<'de> for CurrentAuthorizationInformation
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 PartialEq for CurrentAuthorizationInformation
impl PartialEq for CurrentAuthorizationInformation
source§fn eq(&self, other: &CurrentAuthorizationInformation) -> bool
fn eq(&self, other: &CurrentAuthorizationInformation) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl Eq for CurrentAuthorizationInformation
impl StructuralPartialEq for CurrentAuthorizationInformation
Auto Trait Implementations§
impl Freeze for CurrentAuthorizationInformation
impl RefUnwindSafe for CurrentAuthorizationInformation
impl Send for CurrentAuthorizationInformation
impl Sync for CurrentAuthorizationInformation
impl Unpin for CurrentAuthorizationInformation
impl UnwindSafe for CurrentAuthorizationInformation
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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)