pub struct FirebaseApp { /* private fields */ }Expand description
The entry point for the Firebase Admin SDK.
FirebaseApp holds the service account credentials and acts as a factory for creating
clients for specific Firebase services (Auth, Messaging, etc.).
It uses a “synchronous constructor, lazy async authentication” pattern.
The new method is synchronous and cheap, while the actual OAuth2 authentication
happens asynchronously and lazily upon the first API request made by any service client.
Implementations§
Source§impl FirebaseApp
impl FirebaseApp
Sourcepub fn new(service_account_key: ServiceAccountKey) -> Self
pub fn new(service_account_key: ServiceAccountKey) -> Self
Creates a new FirebaseApp instance.
This method is synchronous. The service account key is stored, but no network
requests are made until a service (like auth() or messaging()) actually performs an action.
§Arguments
service_account_key- Ayup_oauth2::ServiceAccountKeystruct containing the credentials.
Sourcepub fn auth(&self) -> FirebaseAuth
pub fn auth(&self) -> FirebaseAuth
Returns a client for interacting with Firebase Authentication.
Sourcepub fn messaging(&self) -> FirebaseMessaging
pub fn messaging(&self) -> FirebaseMessaging
Returns a client for interacting with Firebase Cloud Messaging (FCM).
Sourcepub fn remote_config(&self) -> FirebaseRemoteConfig
pub fn remote_config(&self) -> FirebaseRemoteConfig
Returns a client for interacting with Firebase Remote Config.
Sourcepub fn crashlytics(&self) -> FirebaseCrashlytics
pub fn crashlytics(&self) -> FirebaseCrashlytics
Returns a client for interacting with Firebase Crashlytics.
Sourcepub fn firestore(&self) -> FirebaseFirestore
pub fn firestore(&self) -> FirebaseFirestore
Returns a client for interacting with Cloud Firestore.
Sourcepub fn storage(&self) -> FirebaseStorage
pub fn storage(&self) -> FirebaseStorage
Returns a client for interacting with Firebase Storage.