Skip to main content

ErrorMonitor

Struct ErrorMonitor 

Source
pub struct ErrorMonitor { /* private fields */ }

Implementations§

Source§

impl ErrorMonitor

Source

pub fn new() -> Self

Source

pub fn record_error(&self, error: &OfficeError)

记录错误

Source

pub fn get_stats(&self) -> Vec<ErrorStats>

获取错误统计

Source

pub async fn record_error_async(&self, error: &OfficeError)

异步记录错误

Source

pub async fn get_stats_async(&self) -> Vec<ErrorStats>

异步获取统计信息

Source

pub fn detect_error_patterns(&self) -> Vec<ErrorPattern>

检测错误模式

Source

pub fn set_error_threshold(&self, category: ErrorCategory, threshold: u64)

设置错误阈值告警

Source

pub fn total_errors(&self) -> u64

获取总错误数

Source

pub fn most_common_errors(&self, limit: usize) -> Vec<ErrorStats>

获取最常见的错误

Source

pub fn collect_metrics(&self) -> ErrorMetrics

添加错误指标收集

提供错误趋势分析

Source

pub fn generate_report(&self, error: &OfficeError) -> ErrorReport

生成详细错误报告

Source

pub fn export_stats_report(&self, format: ReportFormat) -> Vec<u8>

导出错误统计报告

Source

pub fn clear_stats(&self)

清除统计信息

Trait Implementations§

Source§

impl Debug for ErrorMonitor

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.