pub trait RecordEvent {
    // Required methods
    fn severity(&self) -> u8;
    fn file(&self) -> Option<&str>;
    fn line(&self) -> Option<u32>;
    fn target(&self) -> &str;
    fn write_arguments<B: MutableBuffer>(
        self,
        writer: &mut Encoder<B>
    ) -> Result<(), EncodingError>;
    fn timestamp(&self) -> Time;
}
Expand description

Trait implemented by types which can be written by the Encoder.

Required Methods§

source

fn severity(&self) -> u8

Returns the record severity.

source

fn file(&self) -> Option<&str>

Returns the name of the file where the record was emitted.

source

fn line(&self) -> Option<u32>

Returns the number of the line in the file where the record was emitted.

source

fn target(&self) -> &str

Returns the target of the record.

source

fn write_arguments<B: MutableBuffer>( self, writer: &mut Encoder<B> ) -> Result<(), EncodingError>

Consumes this type and writes all the arguments.

source

fn timestamp(&self) -> Time

Returns the timestamp associated to this record.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl RecordEvent for TestRecord<'_>

source§

impl<'a, S> RecordEvent for TracingEvent<'a, S>
where for<'lookup> S: Subscriber + LookupSpan<'lookup>,