pub struct FirebaseAuth { /* private fields */ }Implementations§
Source§impl FirebaseAuth
impl FirebaseAuth
Sourcepub fn new(inner: Arc<Auth>) -> Self
pub fn new(inner: Arc<Auth>) -> Self
Creates a high-level Auth façade around the shared Auth core.
Sourcepub fn app(&self) -> &FirebaseApp
pub fn app(&self) -> &FirebaseApp
Returns the FirebaseApp associated with this Auth instance.
Sourcepub fn current_user(&self) -> Option<Arc<User>>
pub fn current_user(&self) -> Option<Arc<User>>
Returns the currently signed-in user, if any.
Sourcepub fn sign_in_with_email_and_password(
&self,
email: &str,
password: &str,
) -> AuthResult<UserCredential>
pub fn sign_in_with_email_and_password( &self, email: &str, password: &str, ) -> AuthResult<UserCredential>
Signs a user in with an email and password.
Sourcepub fn create_user_with_email_and_password(
&self,
email: &str,
password: &str,
) -> AuthResult<UserCredential>
pub fn create_user_with_email_and_password( &self, email: &str, password: &str, ) -> AuthResult<UserCredential>
Creates a new user with the provided email and password.
Sourcepub fn on_auth_state_changed(
&self,
observer: PartialObserver<Arc<User>>,
) -> impl FnOnce() + Send + 'static
pub fn on_auth_state_changed( &self, observer: PartialObserver<Arc<User>>, ) -> impl FnOnce() + Send + 'static
Registers an observer that is notified whenever the auth state changes.
Trait Implementations§
Source§impl Clone for FirebaseAuth
impl Clone for FirebaseAuth
Source§fn clone(&self) -> FirebaseAuth
fn clone(&self) -> FirebaseAuth
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for FirebaseAuth
impl !RefUnwindSafe for FirebaseAuth
impl Send for FirebaseAuth
impl Sync for FirebaseAuth
impl Unpin for FirebaseAuth
impl !UnwindSafe for FirebaseAuth
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