pub(crate) fn buffer_write(
        &mut self,
        sequencer_number: SequenceNumber,
        mb: MutableBatch,
    ) -> Result<()> {
        match &mut self.data.buffer {
            Some(buf) => {
                buf.max_sequence_number = sequencer_number.max(buf.max_sequence_number);
                buf.data.extend_from(&mb).context(BufferWriteSnafu)?;
            }
            None => {
                self.data.buffer = Some(BufferBatch {
                    min_sequence_number: sequencer_number,
                    max_sequence_number: sequencer_number,
                    data: mb,
                })
            }
        }

        Ok(())
    }
/// Write the given mb in the buffer
Write the given mb in the buffer
Write the given mb in the buffer
pub(crate) fn buffer_write(
        &mut self,
        sequencer_number: SequenceNumber,
        mb: MutableBatch,
    ) -> Result<()> {
        match &mut self.data.buffer {
            Some(buf) => {
                buf.max_sequence_number = sequencer_number.max(buf.max_sequence_number);
                buf.data.extend_from(&mb).context(BufferWriteSnafu)?;
            }
            None => {
                self.data.buffer = Some(BufferBatch {
                    min_sequence_number: sequencer_number,
                    max_sequence_number: sequencer_number,
                    data: mb,
                })
            }
        }
        Ok(())
    }
pub ( crate ) fn buffer_write ( & mut self , sequencer_number : SequenceNumber , mb : MutableBatch , ) -> Result < ( ) > { match & mut self . data . buffer { Some ( buf ) => { buf . max_sequence_number = sequencer_number . max ( buf . max_sequence_number ) ; buf . data . extend_from ( & mb ) . context ( BufferWriteSnafu ) ? ; } None => { self . data . buffer = Some ( BufferBatch { min_sequence_number : sequencer_number , max_sequence_number : sequencer_number , data : mb , } ) } } Ok ( ( ) ) }
Write the given mb in the buffer
Write the given mb in the buffer
&mut self
sequencer_number
SequenceNumber
mb
MutableBatch
&mut self
sequencer_number
SequenceNumber
mb
MutableBatch