Struct fluvio_dataplane_protocol::batch::Batch[][src]

pub struct Batch<R = MemoryRecords> {
    pub base_offset: Offset,
    pub batch_len: i32,
    pub header: BatchHeader,
    // some fields omitted
}

Fields

base_offset: Offsetbatch_len: i32header: BatchHeader

Implementations

get last offset delta

decode from buf stored in the file read all excluding records

Create a new empty batch

add new record, this will update the offset to correct

computed last offset which is base offset + number of records

Trait Implementations

Formats the value using the given formatter. Read more

decode Kafka compliant protocol values from buf

Returns the “default value” for a type. Read more

size of this object in bytes

encoding contents for buffer

Performs the conversion.

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.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

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.