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
sourceimpl 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
sourceimpl<'de> Deserialize<'de> for UserData
impl<'de> Deserialize<'de> for UserData
sourcefn 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 RefUnwindSafe for UserData
impl Send for UserData
impl Sync for UserData
impl Unpin for UserData
impl UnwindSafe for UserData
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more