pub trait Headers {
fn count(&self) -> usize;
fn get(&self, idx: usize) -> Option<(&str, &[u8])>;
fn get_as<V: FromBytes + ?Sized>(
&self,
idx: usize
) -> Option<(&str, Result<&V, V::Error>)> { ... }
}
Expand description
A generic representation of Kafka message headers.
This trait represents readable message headers. Headers are key-value pairs that can be sent alongside every message. Only read-only methods are provided by this trait, as the underlying storage might not allow modification.