pub struct Msg { /* private fields */ }Expand description
Push Notification Message structure.
This struct represents a push notification message that can be sent to devices. It contains various fields to customize the notification’s behavior and appearance.
§Example
use bark::msg::Msg;
// new a simple message with title and body
let msg = Msg::new("title", "body");
// new a message with title = Notification and body
let mut msg = Msg::with_body("body");
// set some fields
msg.set_level("active");
msg.set_badge(1);
// and so onImplementations§
Source§impl Msg
impl Msg
Sourcepub fn set_auto_copy(&mut self, auto_copy: u8) -> &mut Self
pub fn set_auto_copy(&mut self, auto_copy: u8) -> &mut Self
Sourcepub fn set_is_archive(&mut self, is_archive: u8) -> &mut Self
pub fn set_is_archive(&mut self, is_archive: u8) -> &mut Self
Sourcepub fn set_enc_type(&mut self, enc_type: &EncryptType) -> &mut Self
pub fn set_enc_type(&mut self, enc_type: &EncryptType) -> &mut Self
Sets the encryption type and updates the cipher.
§Arguments
enc_type: The encryption typeEncryptType.
§Panics
Panics if the encryption type already set.
§Returns
A mutable reference to self for method chaining.
Sourcepub fn set_mode(&mut self, mode: &EncryptMode) -> &mut Self
pub fn set_mode(&mut self, mode: &EncryptMode) -> &mut Self
Sets the encryption mode and updates the cipher.
§Arguments
mode: The encryption modeEncryptMode.
§Panics
Panics if the encryption mode already set.
§Returns
A mutable reference to self for method chaining.
Auto Trait Implementations§
impl Freeze for Msg
impl RefUnwindSafe for Msg
impl Send for Msg
impl Sync for Msg
impl Unpin for Msg
impl UnwindSafe for Msg
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
Mutably borrows from an owned value. Read more