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 queued for
sanitization and publication.
§Errors
Returns an error when the runtime owner check fails or when internal state cannot be read safely.
§Notes
The mark event is queued with subscriber and sanitizer snapshots captured from the active scope stack.