Struct fluvio::dataplane::batch::Batch[][src]

pub struct Batch<R> where
    R: BatchRecords
{ pub base_offset: i64, pub batch_len: i32, pub header: BatchHeader, // some fields omitted }

Fields

base_offset: i64batch_len: i32header: BatchHeader

Implementations

impl<R> Batch<R> where
    R: BatchRecords
[src]

pub fn get_mut_header(&mut self) -> &mut BatchHeader[src]

pub fn get_header(&self) -> &BatchHeader[src]

pub fn own_records(self) -> R[src]

pub fn records(&self) -> &R[src]

pub fn mut_records(&mut self) -> &mut R[src]

pub fn get_base_offset(&self) -> i64[src]

pub fn set_base_offset(&mut self, offset: i64)[src]

pub fn base_offset(self, offset: i64) -> Batch<R>[src]

pub fn set_offset_delta(&mut self, delta: i32)[src]

pub fn get_last_offset(&self) -> i64[src]

pub fn get_last_offset_delta(&self) -> u32[src]

get last offset delta

pub fn decode_from_file_buf<T>(
    &mut self,
    src: &mut T,
    version: i16
) -> Result<(), Error> where
    T: Buf
[src]

decode from buf stored in the file read all excluding records

impl Batch<Vec<Record<DefaultAsyncBuffer>, Global>>[src]

pub fn add_record(&mut self, record: Record<DefaultAsyncBuffer>)[src]

add new record, this will update the offset to correct

pub fn computed_last_offset(&self) -> i64[src]

computed last offset which is base offset + number of records

Trait Implementations

impl<R> Debug for Batch<R> where
    R: Debug + BatchRecords
[src]

impl<R> Decoder for Batch<R> where
    R: BatchRecords
[src]

impl<R> Default for Batch<R> where
    R: Default + BatchRecords
[src]

impl<R> Encoder for Batch<R> where
    R: BatchRecords
[src]

Auto Trait Implementations

impl<R> RefUnwindSafe for Batch<R> where
    R: RefUnwindSafe

impl<R> Send for Batch<R> where
    R: Send

impl<R> Sync for Batch<R> where
    R: Sync

impl<R> Unpin for Batch<R> where
    R: Unpin

impl<R> UnwindSafe for Batch<R> where
    R: UnwindSafe

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> Erased for T

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

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

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

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.

impl<T> WithSubscriber for T[src]