Skip to main content

RecordEvent

Trait RecordEvent 

Source
pub trait RecordEvent {
    // Required methods
    fn raw_severity(&self) -> RawSeverity;
    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) -> BootInstant;
}
Expand description

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

Required Methods§

Source

fn raw_severity(&self) -> RawSeverity

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) -> BootInstant

Returns the timestamp associated to this record.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§