pub struct User { /* private fields */ }Implementations§
Source§impl User
impl User
Sourcepub fn new(app: FirebaseApp, info: UserInfo) -> Self
pub fn new(app: FirebaseApp, info: UserInfo) -> Self
Creates a new user bound to the given app with profile information.
Sourcepub fn app(&self) -> &FirebaseApp
pub fn app(&self) -> &FirebaseApp
Returns the owning FirebaseApp for the user.
Sourcepub fn is_anonymous(&self) -> bool
pub fn is_anonymous(&self) -> bool
Indicates whether the user signed in anonymously.
Sourcepub fn set_anonymous(&mut self, anonymous: bool)
pub fn set_anonymous(&mut self, anonymous: bool)
Flags the user as anonymous or regular.
Sourcepub fn email_verified(&self) -> bool
pub fn email_verified(&self) -> bool
Indicates whether the user’s email has been verified.
Sourcepub fn refresh_token(&self) -> Option<String>
pub fn refresh_token(&self) -> Option<String>
Returns the refresh token issued for this user, if present.
Sourcepub fn get_id_token(&self, _force_refresh: bool) -> AuthResult<String>
pub fn get_id_token(&self, _force_refresh: bool) -> AuthResult<String>
Returns the cached ID token or an error if none is available.
Sourcepub fn token_manager(&self) -> &TokenManager
pub fn token_manager(&self) -> &TokenManager
Exposes the underlying token manager.
Sourcepub fn update_tokens(
&self,
access_token: Option<String>,
refresh_token: Option<String>,
expires_in: Option<Duration>,
)
pub fn update_tokens( &self, access_token: Option<String>, refresh_token: Option<String>, expires_in: Option<Duration>, )
Updates the cached tokens with fresh credentials from the backend.
pub fn mfa_info(&self) -> Vec<MultiFactorInfo>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for User
impl RefUnwindSafe for User
impl Send for User
impl Sync for User
impl Unpin for User
impl UnwindSafe for User
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