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

pub struct OwnedMessage { /* fields omitted */ }

A Kafka message that owns its backing data.

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

Implementations

impl OwnedMessage[src]

pub fn new(
    payload: Option<Vec<u8>>,
    key: Option<Vec<u8>>,
    topic: String,
    timestamp: Timestamp,
    partition: i32,
    offset: i64,
    headers: Option<OwnedHeaders>
) -> OwnedMessage
[src]

Creates a new message with the specified content.

This function is mainly useful in tests of rust-rdkafka itself.

Trait Implementations

impl Clone for OwnedMessage[src]

impl Debug for OwnedMessage[src]

impl Message for OwnedMessage[src]

type Headers = OwnedHeaders

The type of headers that this message contains.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.