pub struct HookRecord {
pub schema_version: u16,
pub hook_id: HookId,
pub point: HookPoint,
pub payload: HookRecordPayload,
}Expand description
Carries the hook record record payload for journal, event, or fixture surfaces. Creating or cloning it only preserves serialized SDK state; append, publish, replay, or export effects are documented on the runtime and port methods that store it.
Fields§
§schema_version: u16Wire schema version used for compatibility checks.
hook_id: HookIdStable hook id used for typed lineage, lookup, or dedupe.
point: HookPointPoint used by this record or request.
payload: HookRecordPayloadPayload carried by this record. Use the surrounding policy and redaction fields to decide whether it can be exposed.
Implementations§
Source§impl HookRecord
impl HookRecord
Sourcepub fn registered(spec: &HookSpec) -> Result<Self, AgentError>
pub fn registered(spec: &HookSpec) -> Result<Self, AgentError>
Registered. This is data-only and does not perform I/O, call host ports, append journals, publish events, or start processes.
Sourcepub fn invocation_started(
spec: &HookSpec,
invocation_id: impl Into<String>,
) -> Self
pub fn invocation_started( spec: &HookSpec, invocation_id: impl Into<String>, ) -> Self
Builds the invocation started value. This is data construction and performs no I/O, journal append, event publication, or process work.
Sourcepub fn completed(
spec: &HookSpec,
invocation_id: impl Into<String>,
elapsed_ms: u64,
) -> Self
pub fn completed( spec: &HookSpec, invocation_id: impl Into<String>, elapsed_ms: u64, ) -> Self
Returns an updated value with completed configured. This is data-only and does not perform I/O, call host ports, append journals, publish events, or start processes.
Sourcepub fn timeout(
spec: &HookSpec,
invocation_id: impl Into<String>,
elapsed_ms: u64,
) -> Self
pub fn timeout( spec: &HookSpec, invocation_id: impl Into<String>, elapsed_ms: u64, ) -> Self
Builds the timeout record or result value. This is data-only and does not perform I/O, call host ports, append journals, publish events, or start processes.
Sourcepub fn cancelled(spec: &HookSpec, invocation_id: impl Into<String>) -> Self
pub fn cancelled(spec: &HookSpec, invocation_id: impl Into<String>) -> Self
Cancelled. This is data-only and does not perform I/O, call host ports, append journals, publish events, or start processes.
Sourcepub fn failed(
spec: &HookSpec,
invocation_id: impl Into<String>,
redacted_summary: impl Into<String>,
) -> Self
pub fn failed( spec: &HookSpec, invocation_id: impl Into<String>, redacted_summary: impl Into<String>, ) -> Self
Returns an updated value with failed configured. This is data-only and does not perform I/O, call host ports, append journals, publish events, or start processes.
Sourcepub fn response_decision(
spec: &HookSpec,
invocation_id: impl Into<String>,
decision: HookResponseDecision,
response_class: HookResponseClass,
target_domain_refs: Vec<EntityRef>,
) -> Self
pub fn response_decision( spec: &HookSpec, invocation_id: impl Into<String>, decision: HookResponseDecision, response_class: HookResponseClass, target_domain_refs: Vec<EntityRef>, ) -> Self
Returns the response decision currently held by this value. This is data-only and does not perform I/O, call host ports, append journals, publish events, or start processes.
Trait Implementations§
Source§impl Clone for HookRecord
impl Clone for HookRecord
Source§fn clone(&self) -> HookRecord
fn clone(&self) -> HookRecord
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for HookRecord
impl Debug for HookRecord
Source§impl<'de> Deserialize<'de> for HookRecord
impl<'de> Deserialize<'de> for HookRecord
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for HookRecord
impl PartialEq for HookRecord
Source§fn eq(&self, other: &HookRecord) -> bool
fn eq(&self, other: &HookRecord) -> bool
self and other values to be equal, and is used by ==.