Struct expo_server_sdk::PushMessage [−][src]
pub struct PushMessage { pub to: PushToken, pub data: Option<Value>, pub title: Option<String>, pub body: Option<String>, pub sound: Option<Sound>, pub ttl: Option<u32>, pub expiration: Option<u32>, pub priority: Option<Priority>, pub badge: Option<u32>, }
A PushMessage
struct modelled after the one listed here:
Example:
extern crate expo_server_sdk; use expo_server_sdk::*; use std::str::FromStr; let token = PushToken::from_str("ExpoPushToken[my-token]").unwrap(); let mut msg = PushMessage::new(token).body("test notification");
Fields
to: PushToken
data: Option<Value>
title: Option<String>
body: Option<String>
sound: Option<Sound>
ttl: Option<u32>
expiration: Option<u32>
priority: Option<Priority>
badge: Option<u32>
Methods
impl PushMessage
[src]
impl PushMessage
pub fn new(push_token: PushToken) -> PushMessage
[src]
pub fn new(push_token: PushToken) -> PushMessage
pub fn data(self, data: Value) -> Self
[src]
pub fn data(self, data: Value) -> Self
pub fn title(
self,
title: impl Into<String>
) -> Self
[src]
pub fn title(
self,
title: impl Into<String>
) -> Self
pub fn body(
self,
body: impl Into<String>
) -> Self
[src]
pub fn body(
self,
body: impl Into<String>
) -> Self
pub fn sound(self, sound: Sound) -> Self
[src]
pub fn sound(self, sound: Sound) -> Self
pub fn ttl(self, ttl: u32) -> Self
[src]
pub fn ttl(self, ttl: u32) -> Self
pub fn expiration(self, expiration: u32) -> Self
[src]
pub fn expiration(self, expiration: u32) -> Self
pub fn priority(self, priority: Priority) -> Self
[src]
pub fn priority(self, priority: Priority) -> Self
pub fn badge(self, badge: u32) -> Self
[src]
pub fn badge(self, badge: u32) -> Self
Trait Implementations
impl Clone for PushMessage
[src]
impl Clone for PushMessage
fn clone(&self) -> PushMessage
[src]
fn clone(&self) -> PushMessage
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl Send for PushMessage
impl Send for PushMessage
impl Sync for PushMessage
impl Sync for PushMessage