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§
Sourcefn close(&self) -> impl Future<Output = TransportResult<()>> + Send
fn close(&self) -> impl Future<Output = TransportResult<()>> + Send
Shutdown the transport gracefully.
Sourcefn is_healthy(&self) -> bool
fn is_healthy(&self) -> bool
Check if the transport is healthy and connected.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".