pub struct FileJournal { /* private fields */ }Expand description
A JSONL file written from its own thread.
Journal::record only sends on a channel; the thread owns the file
and does every write and flush. See the module docs for why the I/O
is not on the writer thread.
Implementations§
Source§impl FileJournal
impl FileJournal
Sourcepub fn create(path: &Path) -> Result<Self>
pub fn create(path: &Path) -> Result<Self>
Opens path for append and starts the writing thread.
§Errors
If the file cannot be opened. Once open, later write failures are swallowed rather than reported: the caller has no useful response to “the journal could not be written”, and the one unacceptable response is refusing an op over it.
Trait Implementations§
Source§impl Debug for FileJournal
impl Debug for FileJournal
Source§impl Drop for FileJournal
impl Drop for FileJournal
Auto Trait Implementations§
impl Freeze for FileJournal
impl !RefUnwindSafe for FileJournal
impl Send for FileJournal
impl Sync for FileJournal
impl Unpin for FileJournal
impl UnsafeUnpin for FileJournal
impl !UnwindSafe for FileJournal
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