pub struct BorrowedHeaders;
Expand description

A zero-copy collection of Kafka message headers.

Provides a read-only access to headers owned by a Kafka consumer or producer or by an OwnedHeaders struct.

Implementations

Clones the content of BorrowedHeaders and returns an OwnedHeaders that can outlive the consumer.

This operation requires memory allocation and can be expensive.

Trait Implementations

Returns the number of contained headers.

Gets the specified header, where the first header corresponds to index 0. If the index is out of bounds, returns None. Read more

Like Headers::get, but the value of the header will be converted to the specified type. If the conversion fails, returns an error. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.