fcm-service 0.2.3

A Rust library for sending Firebase Cloud Messaging (FCM) notifications
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use serde::{Deserialize, Serialize};

/// Represents the target of the FCM message (token, topic, or condition).
#[derive(Clone, Debug, Serialize, Deserialize)]
#[serde(rename_all = "lowercase")]
pub enum Target {
    Token(String),
    Topic(String),
    Condition(String),
}

impl Default for Target {
    fn default() -> Self {
        Self::Token(String::new())
    }
}