pub fn event(params: EmitMarkEventParams<'_>) -> Result<()>Expand description
Emit a standalone mark event under the current or provided scope.
This creates a point-in-time lifecycle event without pushing or popping a new scope.
§Parameters
name: Event name to emit.parent: Optional explicit parent scope. WhenNone, the current top of stack is used.data: Optional JSON payload recorded on the emitted event.metadata: Optional JSON metadata recorded on the emitted event.timestamp: Optional timestamp recorded on the emitted mark event. WhenNone, the current UTC time is used.
§Returns
A Result that is Ok(()) after the event has been emitted.
§Errors
Returns an error when the runtime owner check fails or when internal state cannot be read safely.
§Notes
Scope-local subscribers attached to ancestor scopes observe the emitted mark event just like scope, tool, and LLM lifecycle events.