crb_runtime::context

Trait 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.