pub fn push(&mut self, record: ((&[u8], &[u8]), u64, isize)) {
        let ((key, val), ts, diff) = record;
        self.records.key_offsets.push(self.records.key_data.len());
        self.records.key_data.extend_from_slice(key);
        self.records.val_offsets.push(self.records.val_data.len());
        self.records.val_data.extend_from_slice(val);
        self.records.timestamps.push(ts);
        self.records.diffs.push(diff);
        self.records.len += 1;
        // The checks on `key_offsets` and `val_offsets` are different than in the
        // rest of the file because those arrays have not received their final
        // value yet in finish().
        debug_assert_eq!(self.records.key_offsets.len(), self.records.len);
        debug_assert_eq!(self.records.val_offsets.len(), self.records.len);
        debug_assert_eq!(self.records.timestamps.len(), self.records.len);
        debug_assert_eq!(self.records.diffs.len(), self.records.len);
    }
/// Add a record to Self.
Add a record to Self.
Add a record to Self .
pub fn push(&mut self, record: ((&[u8], &[u8]), u64, isize)) {
        let ((key, val), ts, diff) = record;
        self.records.key_offsets.push(self.records.key_data.len());
        self.records.key_data.extend_from_slice(key);
        self.records.val_offsets.push(self.records.val_data.len());
        self.records.val_data.extend_from_slice(val);
        self.records.timestamps.push(ts);
        self.records.diffs.push(diff);
        self.records.len += 1;
        // The checks on `key_offsets` and `val_offsets` are different than in the
        // rest of the file because those arrays have not received their final
        // value yet in finish().
        debug_assert_eq!(self.records.key_offsets.len(), self.records.len);
        debug_assert_eq!(self.records.val_offsets.len(), self.records.len);
        debug_assert_eq!(self.records.timestamps.len(), self.records.len);
        debug_assert_eq!(self.records.diffs.len(), self.records.len);
    }
pub fn push ( & mut self , record : ( ( & [ u8 ] , & [ u8 ] ) , u64 , isize ) ) { let ( ( key , val ) , ts , diff ) = record ; self . records . key_offsets . push ( self . records . key_data . len ( ) ) ; self . records . key_data . extend_from_slice ( key ) ; self . records . val_offsets . push ( self . records . val_data . len ( ) ) ; self . records . val_data . extend_from_slice ( val ) ; self . records . timestamps . push ( ts ) ; self . records . diffs . push ( diff ) ; self . records . len += 1 ; // The checks on `key_offsets` and `val_offsets` are different than in the // rest of the file because those arrays have not received their final // value yet in finish(). debug_assert_eq ! ( self records key_offsets len ( ) self records len ) ; debug_assert_eq ! ( self records val_offsets len ( ) self records len ) ; debug_assert_eq ! ( self records timestamps len ( ) self records len ) ; debug_assert_eq ! ( self records diffs len ( ) self records len ) ; }
Add a record to Self.
Add a record to Self .
&mut self
record
((&[u8], &[u8]), u64, isize)
&mut self
record
((&[u8], &[u8]), u64, isize)