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§
Sourcefn to_database(&self) -> Option<Value>
fn to_database(&self) -> Option<Value>
Representasi Database (untuk disimpan di tabel notifications).
Sourcefn to_whatsapp(&self) -> Option<String>
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".