fn pad_to_block(&self) -> Result<(JournalCheckpoint, u64), Error> {
        let mut inner = self.inner.lock().unwrap();
        let checkpoint = inner.writer.journal_file_checkpoint();
        if checkpoint.file_offset % BLOCK_SIZE != 0 {
            serialize_into(&mut inner.writer, &JournalRecord::EndBlock)?;
            inner.writer.pad_to_block()?;
            if let Some(waker) = inner.flush_waker.take() {
                waker.wake();
            }
        }
        Ok((checkpoint, self.objects.borrowed_metadata_space()))
    }
// Returns the checkpoint as it was prior to padding.  This is done because the super block
// needs to record where the last transaction ends and it's the next transaction that pays the
// price of the padding.
Returns the checkpoint as it was prior to padding.  This is done because the super block
needs to record where the last transaction ends and it's the next transaction that pays the
price of the padding.
Returns the checkpoint as it was prior to padding . This is done because the super block needs to record where the last transaction ends and it ' s the next transaction that pays the price of the padding .
fn pad_to_block(&self) -> Result<(JournalCheckpoint, u64), Error> {
        let mut inner = self.inner.lock().unwrap();
        let checkpoint = inner.writer.journal_file_checkpoint();
        if checkpoint.file_offset % BLOCK_SIZE != 0 {
            serialize_into(&mut inner.writer, &JournalRecord::EndBlock)?;
            inner.writer.pad_to_block()?;
            if let Some(waker) = inner.flush_waker.take() {
                waker.wake();
            }
        }
        Ok((checkpoint, self.objects.borrowed_metadata_space()))
    }
fn pad_to_block ( & self ) -> Result < ( JournalCheckpoint , u64 ) , Error > { let mut inner = self . inner . lock ( ) . unwrap ( ) ; let checkpoint = inner . writer . journal_file_checkpoint ( ) ; if checkpoint . file_offset % BLOCK_SIZE != 0 { serialize_into ( & mut inner . writer , & JournalRecord :: EndBlock ) ? ; inner . writer . pad_to_block ( ) ? ; if let Some ( waker ) = inner . flush_waker . take ( ) { waker . wake ( ) ; } } Ok ( ( checkpoint , self . objects . borrowed_metadata_space ( ) ) ) }
Returns the checkpoint as it was prior to padding.
Returns the checkpoint as it was prior to padding .
&self
&self