pub trait MessagingBridge: Send + Sync {
// Required method
fn health(&self) -> BridgeHealth;
}Expand description
Common interface implemented by every platform bridge (Discord, Telegram, …).
Bridges are singletons accessed via get()-style static accessors on the
concrete type (see DiscordBridge::get(), TelegramBridge::get()) for the
call sites that know their platform statically (e.g. platform-specific HTTP
handlers). This trait exists for call sites that need to treat bridges
polymorphically — today, only handle_status’s aggregation loop.
Required Methods§
Sourcefn health(&self) -> BridgeHealth
fn health(&self) -> BridgeHealth
Current connection/health snapshot. Cheap, non-blocking (reads an
Arc<Mutex<BridgeHealth>> guarded by a short-lived lock).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".