Struct rdkafka::message::OwnedHeaders
source · [−]pub struct OwnedHeaders { /* private fields */ }
Expand description
A collection of Kafka message headers that owns its backing data.
Kafka supports associating an array of key-value pairs to every message,
called message headers. The OwnedHeaders
can be used to create the desired
headers and to pass them to the producer. See also BorrowedHeaders
.
Implementations
Creates a new OwnedHeaders
struct with initial capacity 5.
Creates a new OwnedHeaders
struct with the desired initial capacity.
The structure is automatically resized as more headers are added.
Adds a new header.
Generates a read-only BorrowedHeaders
reference.
Trait Implementations
Returns the “default value” for a type. Read more
Gets the specified header, where the first header corresponds to index
0. If the index is out of bounds, returns None
. Read more
Auto Trait Implementations
Blanket Implementations
Mutably borrows from an owned value. Read more