pub struct RunDayLog { /* private fields */ }Expand description
One writer, externally synchronized when shared between recorders.
Implementations§
Source§impl RunDayLog
impl RunDayLog
pub fn open(live_path: &Path, limits: Limits) -> Result<Self>
Sourcepub fn open_with_clock(
live_path: &Path,
limits: Limits,
clock: Arc<dyn Fn() -> NaiveDate + Send + Sync>,
) -> Result<Self>
pub fn open_with_clock( live_path: &Path, limits: Limits, clock: Arc<dyn Fn() -> NaiveDate + Send + Sync>, ) -> Result<Self>
Supplies date selection without changing callers’ serialized timestamps.
Sourcepub fn append(&mut self, complete_line: &[u8]) -> Result<()>
pub fn append(&mut self, complete_line: &[u8]) -> Result<()>
Appends one complete line, rejecting oversized input before any rollover. A filesystem failure drops this write; it never enables unbounded appends.
pub fn live_path(&self) -> &Path
Auto Trait Implementations§
impl !RefUnwindSafe for RunDayLog
impl !UnwindSafe for RunDayLog
impl Forget for RunDayLog
impl Freeze for RunDayLog
impl Move for RunDayLog
impl Send for RunDayLog
impl Sync for RunDayLog
impl Unpin for RunDayLog
impl UnsafeUnpin for RunDayLog
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