pub struct Dump<T> { /* private fields */ }Expand description
A dump utility that reads WAL records from disk.
It acquires an exclusive lock on the directory to prevent concurrent writes while reading.
Implementations§
Trait Implementations§
Source§impl<T: Types> DumpApi<T> for Dump<T>
impl<T: Types> DumpApi<T> for Dump<T>
Source§fn write_with<D>(&self, write_record: D) -> Result<(), Error>
fn write_with<D>(&self, write_record: D) -> Result<(), Error>
Reads all WAL records from disk and passes them to the provided callback function.
The callback receives:
chunk_id: The ID of the chunk containing the recordindex: The 0-based index of the record within its chunkresult: The result containing either the record data or an IO error
§Errors
Returns an IO error if reading the chunks fails or if the callback returns an error.
Source§fn write<W: Write>(&self, w: W) -> Result<(), Error>
fn write<W: Write>(&self, w: W) -> Result<(), Error>
Writes the Raft log contents to the provided writer.
Source§fn write_display<W: Write>(&self, w: W) -> Result<(), Error>where
RaftLogRecord<T>: Display,
fn write_display<W: Write>(&self, w: W) -> Result<(), Error>where
RaftLogRecord<T>: Display,
Writes the Raft log contents to the provided writer, using
std::fmt::Display for record formatting.Auto Trait Implementations§
impl<T> Freeze for Dump<T>
impl<T> RefUnwindSafe for Dump<T>where
T: RefUnwindSafe,
impl<T> Send for Dump<T>where
T: Send,
impl<T> Sync for Dump<T>where
T: Sync,
impl<T> Unpin for Dump<T>where
T: Unpin,
impl<T> UnsafeUnpin for Dump<T>
impl<T> UnwindSafe for Dump<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more