Function scope_register_subscriber
Function scope_register_subscriber
Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-pii-redaction -p nemo-relay-ffi -p nemo-relay-types -p nemo-relay-plugin -p nemo-relay-worker-proto -p nemo-relay-worker.
pub fn scope_register_subscriber(
scope_uuid: &Uuid,
name: &str,
callback: EventSubscriberFn,
) -> Result<()>
Register a scope-local lifecycle event subscriber.
The subscriber remains active only while the target scope is still present on the active scope stack.
Parameters
scope_uuid: UUID of the owning scope.name: Unique subscriber name within the owning scope.callback: Subscriber callback invoked for events emitted under that scope hierarchy.
Returns
A Result that is Ok(()) when the subscriber was registered.
Errors
Returns FlowError::NotFound when the scope does not exist on the active stack and FlowError::AlreadyExists when the scope already owns a subscriber with the same name.
Notes
Scope-local subscribers are removed automatically when the owning scope is popped. Native event-producing APIs enqueue subscriber work and return without waiting for callbacks.