Skip to main content

emit

Function emit 

Source
pub fn emit<P, E>(
    channel: &E,
    kind: EventKind,
    payload: P,
) -> Result<(), AppError>
where P: Serialize + Clone, E: EventEmitter,
Expand description

Emit an event through any EventEmitter channel.

This thin wrapper lets call sites omit the .emit(…) method chain and keeps the signature uniform across production and test code.