pub struct FirebaseClient {
pub service_account_key: ServiceAccountKey,
pub reqwest_client: Client,
pub token_response: Arc<RwLock<Option<TokenResponse>>>,
pub token_expiry: AtomicI64,
}Fields§
§service_account_key: ServiceAccountKey§reqwest_client: Client§token_response: Arc<RwLock<Option<TokenResponse>>>§token_expiry: AtomicI64Implementations§
Source§impl FirebaseClient
impl FirebaseClient
pub fn new_from_file(path: &str) -> Result<Self>
pub fn new_from_env(app_env: Option<String>) -> Result<Self>
pub fn create_jwt(&self, scopes: &str) -> Result<String>
pub async fn get_access_token(&self, scopes: &str) -> Result<()>
pub async fn send_message(&self, message: &impl Serialize) -> Result<StatusCode>
Auto Trait Implementations§
impl !Freeze for FirebaseClient
impl !RefUnwindSafe for FirebaseClient
impl !UnwindSafe for FirebaseClient
impl Send for FirebaseClient
impl Sync for FirebaseClient
impl Unpin for FirebaseClient
impl UnsafeUnpin for FirebaseClient
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