Enum pb_async::PushData[][src]

pub enum PushData<'a> {
    Note {
        title: &'a str,
        body: &'a str,
    },
    Link {
        title: &'a str,
        body: &'a str,
        url: &'a str,
    },
    File {
        body: &'a str,
        file_name: &'a str,
        file_type: &'a str,
        file_url: &'a str,
    },
}

Data which can be pushed.

Used in Client::push.

Variants

Note push.

Fields of Note

The note's title.

The note's message.

Link push.

Fields of Link

The link's title.

A message associated with the link.

The url to open.

File push. Needs to be uploaded first with Client::upload_request.

Fields of File

A message to go with the file.

The name of the file.

The MIME type of the file.

The url for the file. See [UploadRequestResponse.file_url].

Trait Implementations

impl<'a> Copy for PushData<'a>
[src]

impl<'a> Clone for PushData<'a>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'a> Debug for PushData<'a>
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<'a> Send for PushData<'a>

impl<'a> Sync for PushData<'a>