pub struct MessagePayload {Show 15 fields
pub header: Option<Header>,
pub topic: String,
pub message: Option<String>,
pub title: Option<String>,
pub tags: Vec<String>,
pub priority: Option<i32>,
pub actions: Vec<Action>,
pub click: Option<String>,
pub attach: Option<String>,
pub markdown: Option<bool>,
pub icon: Option<String>,
pub filename: Option<String>,
pub delay: Option<String>,
pub email: Option<String>,
pub call: Option<String>,
}Fields§
§header: Option<Header>§topic: StringRequired: Target topic name
message: Option<String>Message body; set to triggered if empty or not passed
title: Option<String>Message title
List of tags that may or may not map to emojis
priority: Option<i32>Message priority
actions: Vec<Action>Custom user action buttons for notifications
click: Option<String>Website opened when notification is clicked
attach: Option<String>URL of an attachment
markdown: Option<bool>Set to true if the message is Markdown-formatted
icon: Option<String>URL to use as notification icon
filename: Option<String>File name of the attachment
delay: Option<String>Timestamp or duration for delayed delivery
email: Option<String>E-mail address for e-mail notifications
call: Option<String>Phone number to use for voice call (or “yes”)
Implementations§
Source§impl MessagePayload
impl MessagePayload
Sourcepub fn message(&self) -> &str
pub fn message(&self) -> &str
Returns the value of message, or the default value if message is unset.
Sourcepub fn title(&self) -> &str
pub fn title(&self) -> &str
Returns the value of title, or the default value if title is unset.
Sourcepub fn priority(&self) -> Priority
pub fn priority(&self) -> Priority
Returns the enum value of priority, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_priority(&mut self, value: Priority)
pub fn set_priority(&mut self, value: Priority)
Sets priority to the provided enum value.
Sourcepub fn click(&self) -> &str
pub fn click(&self) -> &str
Returns the value of click, or the default value if click is unset.
Sourcepub fn attach(&self) -> &str
pub fn attach(&self) -> &str
Returns the value of attach, or the default value if attach is unset.
Sourcepub fn markdown(&self) -> bool
pub fn markdown(&self) -> bool
Returns the value of markdown, or the default value if markdown is unset.
Sourcepub fn filename(&self) -> &str
pub fn filename(&self) -> &str
Returns the value of filename, or the default value if filename is unset.
Sourcepub fn delay(&self) -> &str
pub fn delay(&self) -> &str
Returns the value of delay, or the default value if delay is unset.
Trait Implementations§
Source§impl Clone for MessagePayload
impl Clone for MessagePayload
Source§fn clone(&self) -> MessagePayload
fn clone(&self) -> MessagePayload
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MessagePayload
impl Debug for MessagePayload
Source§impl Default for MessagePayload
impl Default for MessagePayload
Source§impl Message for MessagePayload
impl Message for MessagePayload
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.Source§impl Name for MessagePayload
impl Name for MessagePayload
Source§const NAME: &'static str = "MessagePayload"
const NAME: &'static str = "MessagePayload"
Message.
This name is the same as it appears in the source .proto file, e.g. FooBar.Source§const PACKAGE: &'static str = "make87_ntfy.publish"
const PACKAGE: &'static str = "make87_ntfy.publish"
., e.g. google.protobuf.Source§fn full_name() -> String
fn full_name() -> String
Message.
It’s prefixed with the package name and names of any parent messages,
e.g. google.rpc.BadRequest.FieldViolation.
By default, this is the package name followed by the message name.
Fully-qualified names must be unique within a domain of Type URLs.