Struct rdkafka::message::OwnedMessage [] [src]

pub struct OwnedMessage { /* fields omitted */ }

An OwnedMessage can be created from a BorrowedMessage using the detach method. OwnedMessages don't hold any reference to the consumer, and don't use any memory inside the consumer buffer.

Methods

impl OwnedMessage
[src]

Create a new message with the specified content. Mainly useful for writing tests.

Trait Implementations

impl Message for OwnedMessage
[src]

Returns the key of the message, or None if there is no key.

Returns the payload of the message, or None if there is no payload.

Returns the source topic of the message.

Returns the partition number where the message is stored.

Returns the offset of the message.

Returns the message timestamp for a consumed message if available.

Converts the raw bytes of the payload to a reference of the specified type, that points to the same data inside the message and without performing any memory allocation Read more

Converts the raw bytes of the key to a reference of the specified type, that points to the same data inside the message and without performing any memory allocation Read more