#[non_exhaustive]pub struct CurrentAuthorizationInformation {
pub application: PartialApplication,
pub scopes: Vec<Scope>,
pub expires: Timestamp,
pub user: Option<Box<User>>,
}Expand description
The response of Get Current Authorization Information: what an access token is authorized for.
discord.js counterpart: none (discord-api-types:
RESTGetAPIOAuth2CurrentAuthorizationResult).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.application: PartialApplicationThe application the token belongs to.
scopes: Vec<Scope>The scopes the user authorized.
expires: TimestampWhen the access token expires.
user: Option<Box<User>>The user who authorized, with the identify scope.
Trait Implementations§
Source§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
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 UnsafeUnpin 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