fcm-0.1.1 doesn't have any documentation.
fcm
Usage
Add this to Cargo.toml
:
= "0.1.0"
fcm
then add this to your crate root:
extern crate fcm;
Examples:
Here is an example to send out a FCM Message with some custom data:
use Message;
use HashMap;
let mut map = new;
map.insert;
let result = new
.data
.send;
To send a message using FCM Notifications, we first build the notification:
use ;
let notification = new
.body
.finalize;
And then set it in the message, before sending it:
let result = new
.notification
.send;
You can now handle the result accordingly:
match result