emit

Function emit 

Source
pub fn emit(
    emitter: impl Emitter,
    filter: impl Filter,
    ctxt: impl Ctxt,
    clock: impl Clock,
    evt: impl ToEvent,
)
Expand description

Emit an event.

This function uses the components of the runtime to process the event. It will:

  1. Attempt to assign an extent to the event using clock::Clock::now if the event doesn’t already have one.
  2. Add ctxt::Ctxt::Current to the event properties.
  3. Ensure the event passes filter::Filter::matches.
  4. Emit the event through emitter::Emitter::emit.