pub struct UserData {Show 15 fields
pub expires_in: Option<i64>,
pub expires_at: Option<DateTime<Utc>>,
pub token_type: Option<String>,
pub refresh_expires: Option<i64>,
pub refresh_expires_at: Option<DateTime<Utc>>,
pub account_id: Option<String>,
pub client_id: Option<String>,
pub internal_client: Option<bool>,
pub client_service: Option<String>,
pub display_name: Option<String>,
pub app: Option<String>,
pub in_app_id: Option<String>,
pub device_id: Option<String>,
pub error_message: Option<String>,
pub error_code: Option<String>,
/* private fields */
}
Expand description
Structure that holds all user data
Needed for login
Fields§
§expires_in: Option<i64>
§expires_at: Option<DateTime<Utc>>
§token_type: Option<String>
§refresh_expires: Option<i64>
§refresh_expires_at: Option<DateTime<Utc>>
§account_id: Option<String>
§client_id: Option<String>
§internal_client: Option<bool>
§client_service: Option<String>
§display_name: Option<String>
§app: Option<String>
§in_app_id: Option<String>
§device_id: Option<String>
§error_message: Option<String>
§error_code: Option<String>
Implementations§
Source§impl UserData
impl UserData
Sourcepub fn access_token(&self) -> Option<String>
pub fn access_token(&self) -> Option<String>
Get access token
Sourcepub fn refresh_token(&self) -> Option<String>
pub fn refresh_token(&self) -> Option<String>
Get refresh token
Sourcepub fn set_access_token(&mut self, token: Option<String>)
pub fn set_access_token(&mut self, token: Option<String>)
Set access token
Sourcepub fn set_refresh_token(&mut self, token: Option<String>)
pub fn set_refresh_token(&mut self, token: Option<String>)
Set refresh token
Trait Implementations§
Source§impl<'de> Deserialize<'de> for UserData
impl<'de> Deserialize<'de> for UserData
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 StructuralPartialEq for UserData
Auto Trait Implementations§
impl Freeze for UserData
impl RefUnwindSafe for UserData
impl Send for UserData
impl Sync for UserData
impl Unpin for UserData
impl UnwindSafe for UserData
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