Skip to main content

PayloadBatch

Trait PayloadBatch 

Source
pub trait PayloadBatch<'buf> {
    // Required methods
    fn next_payload(&mut self) -> Option<RawPayload<'buf>>;
    fn ack(&self) -> &AckRef;
}
Expand description

One poll’s worth of borrowed payloads. Streaming — payloads are handed out one at a time, and every payload shares the batch lifetime 'buf. The batch carries exactly one AckRef, issued by the lane through its AckIssuer; records derived from these payloads clone it.

Required Methods§

Source

fn next_payload(&mut self) -> Option<RawPayload<'buf>>

The next payload, or None when the batch is exhausted.

Source

fn ack(&self) -> &AckRef

The acknowledgement handle covering every payload in this batch.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<'a> PayloadBatch<'a> for KafkaBatch<'a>

Source§

fn next_payload(&mut self) -> Option<RawPayload<'a>>

Source§

fn ack(&self) -> &AckRef

Source§

impl<'a> PayloadBatch<'a> for S3Batch<'a>

Source§

fn next_payload(&mut self) -> Option<RawPayload<'a>>

Source§

fn ack(&self) -> &AckRef

Implementors§