pub struct Interrupt {
pub id: InterruptId,
pub thread_id: RunId,
pub kind: InterruptKind,
pub payload_schema: Value,
pub created_at: DateTime<Utc>,
pub step_id: Option<String>,
}Expand description
A kernel interrupt: represents a pause in execution waiting for external input.
Fields§
§id: InterruptIdUnique interrupt identifier.
thread_id: RunIdRun (thread) this interrupt belongs to.
kind: InterruptKindKind of interrupt.
payload_schema: ValueJSON schema describing the expected payload for resolution.
created_at: DateTime<Utc>When the interrupt was created.
step_id: Option<String>Optional step/node that triggered the interrupt.
Implementations§
Source§impl Interrupt
impl Interrupt
Sourcepub fn new(
id: InterruptId,
thread_id: RunId,
kind: InterruptKind,
payload_schema: Value,
) -> Self
pub fn new( id: InterruptId, thread_id: RunId, kind: InterruptKind, payload_schema: Value, ) -> Self
Creates a new interrupt.
Sourcepub fn with_step(
id: InterruptId,
thread_id: RunId,
kind: InterruptKind,
payload_schema: Value,
step_id: String,
) -> Self
pub fn with_step( id: InterruptId, thread_id: RunId, kind: InterruptKind, payload_schema: Value, step_id: String, ) -> Self
Creates a new interrupt with a step id.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Interrupt
impl<'de> Deserialize<'de> for Interrupt
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Interrupt
impl RefUnwindSafe for Interrupt
impl Send for Interrupt
impl Sync for Interrupt
impl Unpin for Interrupt
impl UnsafeUnpin for Interrupt
impl UnwindSafe for Interrupt
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more