pub struct LogAlertHook;Expand description
将告警输出到标准错误流的简单实现。
不依赖外部 log crate,避免在测试或最小化部署场景下引入额外配置。
Implementations§
Source§impl LogAlertHook
impl LogAlertHook
pub fn new() -> LogAlertHook
Trait Implementations§
Source§impl AlertHook for LogAlertHook
impl AlertHook for LogAlertHook
Source§impl Default for LogAlertHook
impl Default for LogAlertHook
Source§fn default() -> LogAlertHook
fn default() -> LogAlertHook
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LogAlertHook
impl RefUnwindSafe for LogAlertHook
impl Send for LogAlertHook
impl Sync for LogAlertHook
impl Unpin for LogAlertHook
impl UnsafeUnpin for LogAlertHook
impl UnwindSafe for LogAlertHook
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more