Skip to main content

TransportBase

Trait TransportBase 

Source
pub trait TransportBase: Send + Sync {
    // Required methods
    fn close(&self) -> impl Future<Output = TransportResult<()>> + Send;
    fn is_healthy(&self) -> bool;
    fn name(&self) -> &'static str;
}
Available on crate feature transport only.
Expand description

Lifecycle and introspection methods shared by senders and receivers.

Required Methods§

Source

fn close(&self) -> impl Future<Output = TransportResult<()>> + Send

Shutdown the transport gracefully.

Source

fn is_healthy(&self) -> bool

Check if the transport is healthy and connected.

Source

fn name(&self) -> &'static str

Get transport name for logging/metrics.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§