[][src]Struct pushover_api::Message

pub struct Message {
    pub token: String,
    pub user: String,
    pub message: String,
    pub device: Option<String>,
    pub title: Option<String>,
    pub url: Option<String>,
    pub url_title: Option<String>,
    pub priority: Option<MessagePriority>,
    pub sound: Option<String>,
    pub timestamp: Option<i64>,
}

The full message body to send to the Pushover API.

Fields

token: String

The application's API token. You can register one here or view your existing ones here.

user: String

The user or group identifier to send the message to.

message: String

The actual message to send.

device: Option<String>

A comma-separated list of devices to send the message to.

If any of the devices for the specified user/group is disabled or invalid, or is set to None, the message will be sent to all active devices for that user/group.

title: Option<String>

The title for the message, if set to None the application's name will be shown instead.

url: Option<String>

A supplementary URL to show with the message.

url_title: Option<String>

A title to use for the supplementary URL.

priority: Option<MessagePriority>

The priority of the message.

sound: Option<String>

The name of one of the sounds to use, see the Pushover documentation for a list of all sounds.

timestamp: Option<i64>

A Unix timestamp to use as the date time for the message instead of when the Pushover API received it.

Implementations

impl Message[src]

pub fn send(&self) -> Result<MessageResponse>[src]

Send this message to the Pushover API.

Trait Implementations

impl Debug for Message[src]

impl Default for Message[src]

impl<'de> Deserialize<'de> for Message[src]

impl Serialize for Message[src]

Auto Trait Implementations

impl RefUnwindSafe for Message

impl Send for Message

impl Sync for Message

impl Unpin for Message

impl UnwindSafe for Message

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.