Trait workflow_log::Sink

source ·
pub trait Sink: AnySync {
    // Required method
    fn write(
        &self,
        target: Option<&str>,
        level: Level,
        args: &Arguments<'_>
    ) -> bool;
}
Expand description

A log sink trait that can be installed into the log subsystem using the pipe function and will receive all log messages.

Required Methods§

source

fn write( &self, target: Option<&str>, level: Level, args: &Arguments<'_> ) -> bool

Implementations§

source§

impl dyn Sink

source

pub fn is<_T>(&self) -> bool
where _T: Any, Self: Downcast<_T>,

source

pub fn downcast_ref<_T>(&self) -> Result<&_T, TypeMismatch>
where _T: Any, Self: Downcast<_T>,

source

pub fn downcast_mut<_T>(&mut self) -> Result<&mut _T, TypeMismatch>
where _T: Any, Self: Downcast<_T>,

source

pub fn downcast<_T>( self: Box<Self> ) -> Result<Box<_T>, DowncastError<Box<Self>>>
where _T: Any, Self: Downcast<_T>,

source

pub fn downcast_rc<_T>( self: Rc<Self> ) -> Result<Rc<_T>, DowncastError<Rc<Self>>>
where _T: Any, Self: Downcast<_T>,

source

pub fn downcast_arc<_T>( self: Arc<Self> ) -> Result<Arc<_T>, DowncastError<Arc<Self>>>
where _T: AnySync, Self: DowncastSync<_T>,

Trait Implementations§

source§

impl<_T> Downcast<_T> for dyn Sink
where _T: Any,

source§

impl<_T> DowncastSync<_T> for dyn Sink
where _T: AnySync,

source§

fn downcast_arc(self: Arc<Self>) -> Result<Arc<T>, DowncastError<Arc<Self>>>

Implementors§