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

Common transport operations shared by senders and receivers.

Every transport implementation provides these lifecycle and introspection methods regardless of direction.

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§