pub struct ErrorMonitor { /* private fields */ }Expand description
错误监控器
Implementations§
Source§impl ErrorMonitor
impl ErrorMonitor
pub fn new() -> Self
Sourcepub fn record_error(&self, error: &OfficeError)
pub fn record_error(&self, error: &OfficeError)
记录错误
Sourcepub fn get_stats(&self) -> Vec<ErrorStats>
pub fn get_stats(&self) -> Vec<ErrorStats>
获取错误统计
Sourcepub fn total_errors(&self) -> u64
pub fn total_errors(&self) -> u64
获取总错误数
Sourcepub fn most_common_errors(&self, limit: usize) -> Vec<ErrorStats>
pub fn most_common_errors(&self, limit: usize) -> Vec<ErrorStats>
获取最常见的错误
Sourcepub fn clear_stats(&self)
pub fn clear_stats(&self)
清除统计信息
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ErrorMonitor
impl RefUnwindSafe for ErrorMonitor
impl Send for ErrorMonitor
impl Sync for ErrorMonitor
impl Unpin for ErrorMonitor
impl UnsafeUnpin for ErrorMonitor
impl UnwindSafe for ErrorMonitor
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