pub struct Journal { /* private fields */ }Implementations§
Source§impl Journal
impl Journal
Sourcepub fn open(path: &Path) -> Result<(Journal, Recovered)>
pub fn open(path: &Path) -> Result<(Journal, Recovered)>
Opens the journal or creates a new one. Returns the complete records from an existing journal.
pub fn append(&mut self, rec: &Record) -> Result<()>
Sourcepub fn sync(&mut self) -> Result<()>
pub fn sync(&mut self) -> Result<()>
Flushes buffered records to disk and waits for the device to confirm.
pub fn is_empty(&self) -> bool
pub fn path(&self) -> &Path
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Journal
impl RefUnwindSafe for Journal
impl Send for Journal
impl Sync for Journal
impl Unpin for Journal
impl UnsafeUnpin for Journal
impl UnwindSafe for Journal
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