pub struct PersistedTask {Show 18 fields
pub schema_version: u32,
pub task_id: String,
pub session_id: String,
pub command: String,
pub workdir: PathBuf,
pub project_root: Option<PathBuf>,
pub status: BgTaskStatus,
pub started_at: u64,
pub finished_at: Option<u64>,
pub duration_ms: Option<u64>,
pub timeout_ms: Option<u64>,
pub exit_code: Option<i32>,
pub child_pid: Option<u32>,
pub pgid: Option<i32>,
pub completion_delivered: bool,
pub notify_on_completion: bool,
pub compressed: bool,
pub status_reason: Option<String>,
}Fields§
§schema_version: u32§task_id: String§session_id: String§command: String§workdir: PathBuf§project_root: Option<PathBuf>§status: BgTaskStatus§started_at: u64§finished_at: Option<u64>§duration_ms: Option<u64>§timeout_ms: Option<u64>§exit_code: Option<i32>§child_pid: Option<u32>§pgid: Option<i32>§completion_delivered: bool§notify_on_completion: bool§compressed: boolPer-call output compression opt-in. Defaults to true so existing
behavior (compression when experimental.bash.compress=true) is
unchanged. Agents can pass compressed: false to disable compression
for a single bash call without flipping the global flag.
status_reason: Option<String>Implementations§
Source§impl PersistedTask
impl PersistedTask
pub fn starting( task_id: String, session_id: String, command: String, workdir: PathBuf, project_root: Option<PathBuf>, timeout_ms: Option<u64>, notify_on_completion: bool, compressed: bool, ) -> Self
pub fn is_terminal(&self) -> bool
pub fn mark_running(&mut self, child_pid: u32, pgid: i32)
pub fn mark_terminal( &mut self, status: BgTaskStatus, exit_code: Option<i32>, reason: Option<String>, )
Trait Implementations§
Source§impl Clone for PersistedTask
impl Clone for PersistedTask
Source§fn clone(&self) -> PersistedTask
fn clone(&self) -> PersistedTask
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PersistedTask
impl Debug for PersistedTask
Source§impl<'de> Deserialize<'de> for PersistedTask
impl<'de> Deserialize<'de> for PersistedTask
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 PersistedTask
impl RefUnwindSafe for PersistedTask
impl Send for PersistedTask
impl Sync for PersistedTask
impl Unpin for PersistedTask
impl UnsafeUnpin for PersistedTask
impl UnwindSafe for PersistedTask
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more