pub struct NotificationBuilder<'a> { /* private fields */ }
Expand description

A builder to get a Notification instance.

Examples

use fcm::NotificationBuilder;

let mut builder = NotificationBuilder::new();
builder.body("3 runs to win in 1 ball");
let notification = builder.finalize();

Implementations

Get a new NotificationBuilder instance, with a title.

Set the body of the notification

Set the notification icon.

Set the sound to be played

Set the badge for iOS notifications

Tagging a notification allows you to replace existing notifications with the same tag with this new notification

The color of the icon, in #rrggbb format

What happens when the user clicks on the notification. Refer to https://developers.google.com/cloud-messaging/http-server-ref#table2 for details.

Set the body key string for localization

String value to replace format specifiers in the body string.

Set the title key string for localization

String value to replace format specifiers in the title string.

Complete the build and get a Notification instance

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.