pub struct LogRotationWatcher { /* private fields */ }Expand description
日志文件轮转监控器
Implementations§
Source§impl LogRotationWatcher
impl LogRotationWatcher
Sourcepub fn should_rotate(&mut self) -> LogResult<bool>
pub fn should_rotate(&mut self) -> LogResult<bool>
检查是否需要轮转
Sourcepub fn update_size(&mut self, additional_bytes: u64)
pub fn update_size(&mut self, additional_bytes: u64)
更新当前文件大小
Sourcepub fn current_size(&self) -> u64
pub fn current_size(&self) -> u64
获取当前文件大小
Auto Trait Implementations§
impl Freeze for LogRotationWatcher
impl RefUnwindSafe for LogRotationWatcher
impl Send for LogRotationWatcher
impl Sync for LogRotationWatcher
impl Unpin for LogRotationWatcher
impl UnsafeUnpin for LogRotationWatcher
impl UnwindSafe for LogRotationWatcher
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