Struct fluvio_dataplane_protocol::batch::Batch [−][src]
pub struct Batch<R> where
R: BatchRecords, { pub base_offset: Offset, pub batch_len: i32, pub header: BatchHeader, // some fields omitted }
Fields
base_offset: Offset
batch_len: i32
header: BatchHeader
Implementations
impl<R> Batch<R> where
R: BatchRecords,
[src]
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) -> Offset
[src]
pub fn set_base_offset(&mut self, offset: Offset)
[src]
pub fn base_offset(self, offset: Offset) -> Self
[src]
pub fn add_to_offset_delta(&mut self, delta: i32)
[src]
pub fn set_offset_delta(&mut self, delta: i32)
[src]
pub fn get_last_offset(&self) -> Offset
[src]
pub fn get_last_offset_delta(&self) -> Size
[src]
get last offset delta
pub fn decode_from_file_buf<T>(
&mut self,
src: &mut T,
version: Version
) -> Result<(), Error> where
T: Buf,
[src]
&mut self,
src: &mut T,
version: Version
) -> Result<(), Error> where
T: Buf,
decode from buf stored in the file read all excluding records
impl Batch<Vec<Record<DefaultAsyncBuffer>, Global>>
[src]
impl Batch<Vec<Record<DefaultAsyncBuffer>, Global>>
[src]pub fn new(records: Vec<DefaultRecord>) -> Self
[src]
Create a new batch from a Vec of DefaultRecords
pub fn add_record(&mut self, record: DefaultRecord)
[src]
add new record, this will update the offset to correct
pub fn computed_last_offset(&self) -> Offset
[src]
computed last offset which is base offset + number of records
Trait Implementations
impl<R: Debug> Debug for Batch<R> where
R: BatchRecords,
[src]
impl<R: Debug> Debug for Batch<R> where
R: BatchRecords,
[src]impl<R> Decoder for Batch<R> where
R: BatchRecords,
[src]
impl<R> Decoder for Batch<R> where
R: BatchRecords,
[src]Auto Trait Implementations
impl<R> RefUnwindSafe for Batch<R> where
R: RefUnwindSafe,
impl<R> RefUnwindSafe for Batch<R> where
R: RefUnwindSafe,
impl<R> UnwindSafe for Batch<R> where
R: UnwindSafe,
impl<R> UnwindSafe for Batch<R> where
R: UnwindSafe,
Blanket Implementations
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]