pub struct ExternalTask {
pub task_id: String,
pub session_id: String,
pub lane: SessionLane,
pub command_type: String,
pub payload: Value,
pub timeout_ms: u64,
pub created_at: Option<Instant>,
}Expand description
An external task that needs to be processed by SDK
Fields§
§task_id: StringUnique task identifier
session_id: StringSession this task belongs to
lane: SessionLaneLane the task is in
command_type: StringType of command (e.g., “bash”, “read”, “write”)
payload: ValueTask payload as JSON
timeout_ms: u64Timeout in milliseconds
created_at: Option<Instant>When the task was created
Implementations§
Source§impl ExternalTask
impl ExternalTask
Sourcepub fn is_timed_out(&self) -> bool
pub fn is_timed_out(&self) -> bool
Check if this task has timed out
Sourcepub fn remaining_ms(&self) -> u64
pub fn remaining_ms(&self) -> u64
Get remaining time until timeout in milliseconds
Trait Implementations§
Source§impl Clone for ExternalTask
impl Clone for ExternalTask
Source§fn clone(&self) -> ExternalTask
fn clone(&self) -> ExternalTask
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExternalTask
impl Debug for ExternalTask
Source§impl<'de> Deserialize<'de> for ExternalTask
impl<'de> Deserialize<'de> for ExternalTask
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 ExternalTask
impl RefUnwindSafe for ExternalTask
impl Send for ExternalTask
impl Sync for ExternalTask
impl Unpin for ExternalTask
impl UnsafeUnpin for ExternalTask
impl UnwindSafe for ExternalTask
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