Struct rdkafka::message::OwnedMessage
source · [−]pub struct OwnedMessage { /* private fields */ }
Expand description
A Kafka message that owns its backing data.
An OwnedMessage
can be created from a BorrowedMessage
using the
BorrowedMessage::detach
method. OwnedMessage
s don’t hold any reference
to the consumer and don’t use any memory inside the consumer buffer.
Implementations
Trait Implementations
type Headers = OwnedHeaders
type Headers = OwnedHeaders
The type of headers that this message contains.
Returns the payload of the message, or None
if there is no payload.
Returns a mutable reference to the payload of the message, or None
if
there is no payload. Read more
Returns the headers of the message, or None
if there are no headers.
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
Auto Trait Implementations
impl RefUnwindSafe for OwnedMessage
impl Send for OwnedMessage
impl Sync for OwnedMessage
impl Unpin for OwnedMessage
impl UnwindSafe for OwnedMessage
Blanket Implementations
Mutably borrows from an owned value. Read more