pub struct Message {
    pub app_token: String,
    pub user_key: String,
    pub message: String,
    pub title: Option<String>,
    pub url: Option<String>,
    pub url_title: Option<String>,
    pub priority: Option<i8>,
    pub sound: Option<String>,
    pub timestamp: Option<u64>,
    pub devices: Option<Vec<String>>,
}
Expand description

A message to be used in conjuction with the send_pushover_request function.

Note: It is preferred to create a Message through the MessageBuilder. *

Fields

app_token: String

(Required) Your app API token, see https://pushover.net/apps/[your application ID]

user_key: String

(Required) Your User key, see your dashboard (https://pushover.net/ top-right)

message: String

(Required) Your message

title: Option<String>

The title of the message, otherwise your app’s name will be used

url: Option<String>

A supplementary URL to show with your message

url_title: Option<String>

A title for your supplementary URL, otherwise just the URL is shown

priority: Option<i8>

Send as -2 to generate no notification/alert, -1 to always send as a quiet notification, 1 to display as high-priority and bypass the user’s quiet hours, or 2 to also require confirmation from the user

sound: Option<String>

The name of one of the sounds supported by device clients to override the user’s default sound choice. (See sound list: https://pushover.net/api#sounds)

timestamp: Option<u64>

A Unix timestamp of your message’s date and time to display to the user, rather than the time your message is received by our API

devices: Option<Vec<String>>

A list of device names to send the push notifications to, if you want to limit the notification to certain devices.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Serialize this value into the given Serde serializer. Read more

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.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

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

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more