pub struct InterruptRequestIntent { /* private fields */ }Expand description
Pre-commit request to register one externally resolvable interrupt.
The request and action digests are distinct: request_payload describes
what the resolver sees or supplies, while action_digest binds the exact
immutable operation whose approval/input/authentication is being requested.
Reusing interrupt_id or request_event_id is idempotent only when the
complete intent digest matches.
Implementations§
Source§impl InterruptRequestIntent
impl InterruptRequestIntent
Sourcepub fn new(
tenant_id: TenantId,
run_id: RunId,
interrupt_id: InterruptId,
request_event_id: EventId,
kind: RunInterruptKind,
request_payload: JournalPayload,
action_digest: Digest,
required_principal: Option<PrincipalIdentity>,
required_scopes: ScopeSet,
expires_at: Option<Timestamp>,
) -> Result<Self, DurableWaitError>
pub fn new( tenant_id: TenantId, run_id: RunId, interrupt_id: InterruptId, request_event_id: EventId, kind: RunInterruptKind, request_payload: JournalPayload, action_digest: Digest, required_principal: Option<PrincipalIdentity>, required_scopes: ScopeSet, expires_at: Option<Timestamp>, ) -> Result<Self, DurableWaitError>
Constructs a complete immutable interrupt-registration intent.
The exclusive expiry is checked against the authoritative database
observation when InterruptRequest::commit materializes the request.
§Errors
Returns DurableWaitError::CanonicalSerialization if the integrity
preimage cannot be encoded canonically.
Sourcepub fn restore(
tenant_id: TenantId,
run_id: RunId,
interrupt_id: InterruptId,
request_event_id: EventId,
kind: RunInterruptKind,
request_payload: JournalPayload,
action_digest: Digest,
required_principal: Option<PrincipalIdentity>,
required_scopes: ScopeSet,
expires_at: Option<Timestamp>,
intent_digest: Digest,
) -> Result<Self, DurableWaitError>
pub fn restore( tenant_id: TenantId, run_id: RunId, interrupt_id: InterruptId, request_event_id: EventId, kind: RunInterruptKind, request_payload: JournalPayload, action_digest: Digest, required_principal: Option<PrincipalIdentity>, required_scopes: ScopeSet, expires_at: Option<Timestamp>, intent_digest: Digest, ) -> Result<Self, DurableWaitError>
Restores and verifies a persisted registration intent.
§Errors
Returns DurableWaitError::IntentDigestMismatch after any mutation.
Sourcepub const fn interrupt_id(&self) -> InterruptId
pub const fn interrupt_id(&self) -> InterruptId
Returns the stable interrupt identity.
Sourcepub const fn request_event_id(&self) -> EventId
pub const fn request_event_id(&self) -> EventId
Returns the exact event that must register this request.
Sourcepub const fn kind(&self) -> RunInterruptKind
pub const fn kind(&self) -> RunInterruptKind
Returns the protocol-neutral interrupt kind.
Sourcepub const fn request_payload(&self) -> &JournalPayload
pub const fn request_payload(&self) -> &JournalPayload
Returns the schema-pinned request payload.
Sourcepub const fn action_digest(&self) -> Digest
pub const fn action_digest(&self) -> Digest
Returns the immutable action checksum protected by the interrupt.
Sourcepub const fn required_principal(&self) -> Option<&PrincipalIdentity>
pub const fn required_principal(&self) -> Option<&PrincipalIdentity>
Returns the exact required resolver, when one was selected.
Sourcepub const fn required_scopes(&self) -> &ScopeSet
pub const fn required_scopes(&self) -> &ScopeSet
Returns every scope a resolver must possess.
Sourcepub const fn expires_at(&self) -> Option<Timestamp>
pub const fn expires_at(&self) -> Option<Timestamp>
Returns the exclusive resolution expiry.
Sourcepub const fn intent_digest(&self) -> Digest
pub const fn intent_digest(&self) -> Digest
Returns the complete semantic idempotency checksum.
Trait Implementations§
Source§impl Clone for InterruptRequestIntent
impl Clone for InterruptRequestIntent
Source§impl Debug for InterruptRequestIntent
impl Debug for InterruptRequestIntent
Source§impl<'de> Deserialize<'de> for InterruptRequestIntent
impl<'de> Deserialize<'de> for InterruptRequestIntent
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>,
impl Eq for InterruptRequestIntent
Source§impl JsonSchema for InterruptRequestIntent
impl JsonSchema for InterruptRequestIntent
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more