Skip to main content

StructuredSink

Trait StructuredSink 

Source
pub trait StructuredSink: Send + Sync {
    // Required methods
    fn write(&self, entry: &StructuredLogEntry);
    fn name(&self) -> &str;
}
Expand description

结构化日志 sink:接收 StructuredLogEntry

LogSink 的区别在于接收结构化条目,可以索引 fields。

Required Methods§

Source

fn write(&self, entry: &StructuredLogEntry)

Source

fn name(&self) -> &str

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§