pub trait Telegram: Send + Sync {
// Required method
fn send(&self, chat_id: ChatId, message: Message);
// Provided method
fn send_text(&self, chat_id: ChatId, text: &str) { ... }
}Expand description
Sends outbound Telegram notifications.
Sending is deliberately synchronous and infallible: a notification must
never block a request handler, and there is rarely anything upstream which
could act on a delivery failure anyway. Failures surface through tracing
instead, which reaches Sentry through the usual subscriber.
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".