Trait crb_runtime::context::Context

source ·
pub trait Context: Send {
    type Address: Send + Clone;

    // Required methods
    fn label(&self) -> &Label;
    fn address(&self) -> &Self::Address;
}
Expand description

A commont methods of all contexts and spans for tracing and logging.

The have provide a reference to a label.

Required Associated Types§

source

type Address: Send + Clone

An address to interact with the context.

Required Methods§

source

fn label(&self) -> &Label

A label that used for logging all events around the context.

source

fn address(&self) -> &Self::Address

A reference to an address.

Implementors§

source§

impl Context for Label

Label is a Context for cases when context is not necessary, but for many runtimes at least Label is required for tracing.

§

type Address = ()