Skip to main content

TransportSender

Trait TransportSender 

Source
pub trait TransportSender: TransportBase {
    // Required method
    fn send(
        &self,
        key: &str,
        payload: &[u8],
    ) -> impl Future<Output = SendResult> + Send;
}
Available on crate feature transport only.
Expand description

Send-side transport.

Extends TransportBase with send capability. The factory returns AnySender (enum dispatch) for runtime transport selection.

All implementations auto-emit dfe_transport_* Prometheus metrics when a MetricsManager recorder is installed.

Required Methods§

Source

fn send( &self, key: &str, payload: &[u8], ) -> impl Future<Output = SendResult> + Send

Send raw bytes to a key/destination.

The key semantics depend on the transport:

  • Kafka: topic name
  • gRPC: metadata routing key
  • HTTP: URL path suffix or ignored
  • File: filename suffix or ignored
  • Redis: stream name
  • Pipe: ignored (single stdout)

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§