pub fn restart(&mut self, starting_index: u64) -> Result<(), LogError> {
        self.file.seek(SeekFrom::Start(0))?;
        self.file.write_all(&starting_index.to_le_bytes())?;
        self.file.set_len(8)?;
        self.file.flush()?;

        self.first_index = starting_index;
        self.len = 0;

        Ok(())
    }
/// Clear all entries in the write-ahead-log and restart at the given index.
Clear all entries in the write-ahead-log and restart at the given index.
Clear all entries in the write - ahead - log and restart at the given index .
pub fn restart(&mut self, starting_index: u64) -> Result<(), LogError> {
        self.file.seek(SeekFrom::Start(0))?;
        self.file.write_all(&starting_index.to_le_bytes())?;
        self.file.set_len(8)?;
        self.file.flush()?;
        self.first_index = starting_index;
        self.len = 0;
        Ok(())
    }
pub fn restart ( & mut self , starting_index : u64 ) -> Result < ( ) , LogError > { self . file . seek ( SeekFrom :: Start ( 0 ) ) ? ; self . file . write_all ( & starting_index . to_le_bytes ( ) ) ? ; self . file . set_len ( 8 ) ? ; self . file . flush ( ) ? ; self . first_index = starting_index ; self . len = 0 ; Ok ( ( ) ) }
Clear all entries in the write-ahead-log and restart at the given index.
Clear all entries in the write - ahead - log and restart at the given index .
&mut self
starting_index
u64