Skip to main content

Notification

Trait Notification 

Source
pub trait Notification: Send + Sync {
    // Provided methods
    fn subject(&self) -> String { ... }
    fn to_mail(&self) -> Option<(String, Value)> { ... }
    fn to_database(&self) -> Option<Value> { ... }
    fn to_whatsapp(&self) -> Option<String> { ... }
}
Expand description

Trait Notification — Kontrak untuk class notifikasi.

Provided Methods§

Source

fn subject(&self) -> String

Judul notifikasi.

Source

fn to_mail(&self) -> Option<(String, Value)>

Representasi Mail.

Source

fn to_database(&self) -> Option<Value>

Representasi Database (untuk disimpan di tabel notifications).

Source

fn to_whatsapp(&self) -> Option<String>

Representasi WhatsApp.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§