Skip to main content

StructuredLogOutput

Trait StructuredLogOutput 

Source
pub trait StructuredLogOutput:
    Debug
    + Send
    + Sync {
    // Required methods
    fn begin(&mut self);
    fn write(&mut self, bytes: &[u8]);
    fn finish(&mut self, success: bool);
}
Expand description

Statically composed destinations for one local serialization attempt. A local section rollover starts a fresh attempt; only successful local writes are committed. Destination overflow must not fail the local write.

Required Methods§

Source

fn begin(&mut self)

Source

fn write(&mut self, bytes: &[u8])

Source

fn finish(&mut self, success: bool)

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl StructuredLogOutput for ()

Source§

fn begin(&mut self)

Source§

fn write(&mut self, _: &[u8])

Source§

fn finish(&mut self, _: bool)

Source§

impl<A: StructuredLogOutput, B: StructuredLogOutput> StructuredLogOutput for (A, B)

Source§

fn begin(&mut self)

Source§

fn write(&mut self, bytes: &[u8])

Source§

fn finish(&mut self, success: bool)

Source§

impl<O: StructuredLogOutput> StructuredLogOutput for Option<O>

Source§

fn begin(&mut self)

Source§

fn write(&mut self, bytes: &[u8])

Source§

fn finish(&mut self, success: bool)

Implementors§