pub struct FcmClient { /* private fields */ }Expand description
Firebase Cloud Messaging (FCM) client.
Implementations§
Source§impl FcmClient
impl FcmClient
Sourcepub async fn send(
&self,
message: Message,
) -> Result<FcmSuccessResponse, FcmError>
pub async fn send( &self, message: Message, ) -> Result<FcmSuccessResponse, FcmError>
Sends an FCM message.
This method constructs and sends an HTTP request to the FCM API to deliver a message to the specified recipients. It handles authentication, constructs the necessary request, and processes the response from the FCM service.
§Arguments
message- TheMessageto send.
§Errors
Returns an FcmError if there’s an issue with the request, authentication,
JSON (de)serialization, the response, or any other error during the sending process.
Auto Trait Implementations§
impl !RefUnwindSafe for FcmClient
impl !UnwindSafe for FcmClient
impl Freeze for FcmClient
impl Send for FcmClient
impl Sync for FcmClient
impl Unpin for FcmClient
impl UnsafeUnpin for FcmClient
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more