pub struct ChannelMessage {
pub category: String,
pub title: String,
pub body: String,
pub url: Option<String>,
pub notification_id: String,
}Expand description
One notification, as an extra Channel delivers it: the rendered
text, the category it was sent under, and the link a tap opens.
What it deliberately does not carry is any recipient — no chat id, no
bot token. The channel resolves those out of its own tables by the
account_id its Channel::deliver is handed, the same way the mail
job carries an account and not an address.
Fields§
§category: StringThe category the notification was sent under — the vocabulary the account’s preferences are written in.
title: StringThe rendered title.
body: StringThe rendered body.
url: Option<String>Where a tap should take the recipient, when the caller set one.
notification_id: StringThe id shared by every copy of this notification, stable across the outbox row’s retries — a channel that cannot accept a message twice dedupes on it, the way mail’s idempotency key does.
Trait Implementations§
Source§impl Clone for ChannelMessage
impl Clone for ChannelMessage
Source§impl Debug for ChannelMessage
impl Debug for ChannelMessage
impl Eq for ChannelMessage
Source§impl PartialEq for ChannelMessage
impl PartialEq for ChannelMessage
impl StructuralPartialEq for ChannelMessage
Auto Trait Implementations§
impl Freeze for ChannelMessage
impl RefUnwindSafe for ChannelMessage
impl Send for ChannelMessage
impl Sync for ChannelMessage
impl Unpin for ChannelMessage
impl UnsafeUnpin for ChannelMessage
impl UnwindSafe for ChannelMessage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.