Function register_subscriber
Function register_subscriber
Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-ffi.
pub fn register_subscriber(
name: &str,
callback: EventSubscriberFn,
) -> Result<()>
Register a global lifecycle event subscriber.
The subscriber is added to the process-wide registry and receives every emitted scope, tool, LLM, and mark event until it is deregistered.
Parameters
name: Unique subscriber name in the global registry.callback: Subscriber callback invoked for each emitted event.
Returns
A Result that is Ok(()) when the subscriber was registered.
Errors
Returns FlowError::AlreadyExists when another global subscriber is already registered under the same name.
Notes
Global subscribers remain active across scopes until explicitly removed. Native event-producing APIs enqueue subscriber work and return without waiting for callbacks.