Struct autopush_common::notification::Notification
source · pub struct Notification {
pub channel_id: Uuid,
pub version: String,
pub ttl: u64,
pub topic: Option<String>,
pub timestamp: u64,
pub data: Option<String>,
pub sortkey_timestamp: Option<u64>,
pub headers: Option<HashMap<String, String>>,
pub reliability_id: Option<String>,
}
Expand description
A Publishable Notification record. This is a notification that is either received from a third party or is outbound to a UserAgent. If the UserAgent is not currently available, it may be stored as a crate::db::NotificationRecord
Fields§
§channel_id: Uuid
§version: String
§ttl: u64
§topic: Option<String>
§timestamp: u64
§data: Option<String>
§sortkey_timestamp: Option<u64>
§headers: Option<HashMap<String, String>>
§reliability_id: Option<String>
Implementations§
source§impl Notification
impl Notification
sourcepub fn chidmessageid(&self) -> String
pub fn chidmessageid(&self) -> String
Return an appropriate chidmessageid
For standard messages: {STANDARD_NOTIFICATION_PREFIX}:{sortkey_timestamp}:{chid}
For topic messages: {TOPIC_NOTIFICATION_PREFIX}:{chid}:{topic}
Old format for non-topic messages that is no longer returned: {chid}:{message_id}
Trait Implementations§
source§impl Clone for Notification
impl Clone for Notification
source§fn clone(&self) -> Notification
fn clone(&self) -> Notification
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for Notification
impl Debug for Notification
source§impl Default for Notification
impl Default for Notification
source§fn default() -> Notification
fn default() -> Notification
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for Notification
impl<'de> Deserialize<'de> for Notification
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Notification
impl RefUnwindSafe for Notification
impl Send for Notification
impl Sync for Notification
impl Unpin for Notification
impl UnwindSafe for Notification
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)