Skip to main content

invoke_app_emit

Function invoke_app_emit 

Source
pub fn invoke_app_emit(
    node: &NodeProto,
    inputs: &[(&str, &dyn SlotValue)],
    ctx: &mut RuntimeResourceRef<'_>,
) -> Result<DispatchResult, OpError>
Expand description

AppEmit(value, name: string) → Sink. Expects a BytesValue input - the emitter is a byte-level surface, so callers wrap their payload in BytesValue upstream.

The user-supplied name is validated against the framework’s reserved-topic prefixes (bb., ai.bytesandbrains.) via AppEvent::emit — a collision surfaces as OpError::BadInput so the engine doesn’t ferry the impersonating publish to subscribers.