pub struct ActiveOperation {
pub operation_id: String,
pub agent_id: String,
pub resource_type: ResourceType,
pub scope: ResourceScope,
pub started_at: Instant,
pub last_heartbeat: Instant,
pub process_id: Option<u32>,
pub status: String,
pub output_lines: VecDeque<String>,
pub description: String,
pub completed: bool,
}Expand description
Information about an active operation
Fields§
§operation_id: StringUnique operation ID
agent_id: StringID of the agent performing the operation
resource_type: ResourceTypeType of resource being used
scope: ResourceScopeScope of the operation
started_at: InstantWhen the operation started
last_heartbeat: InstantLast heartbeat received
process_id: Option<u32>Process ID if running an external command (e.g., cargo build)
status: StringCurrent status message
output_lines: VecDeque<String>Recent output lines from the operation
description: StringDescription of what the operation is doing
completed: boolWhether the operation has been explicitly completed
Implementations§
Source§impl ActiveOperation
impl ActiveOperation
Sourcepub fn is_heartbeat_alive(
&self,
heartbeat_interval: Duration,
max_missed: u32,
) -> bool
pub fn is_heartbeat_alive( &self, heartbeat_interval: Duration, max_missed: u32, ) -> bool
Check if the operation is still alive based on heartbeat
Sourcepub fn time_since_heartbeat(&self) -> Duration
pub fn time_since_heartbeat(&self) -> Duration
Get time since last heartbeat
Trait Implementations§
Source§impl Clone for ActiveOperation
impl Clone for ActiveOperation
Source§fn clone(&self) -> ActiveOperation
fn clone(&self) -> ActiveOperation
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 moreAuto Trait Implementations§
impl Freeze for ActiveOperation
impl RefUnwindSafe for ActiveOperation
impl Send for ActiveOperation
impl Sync for ActiveOperation
impl Unpin for ActiveOperation
impl UnsafeUnpin for ActiveOperation
impl UnwindSafe for ActiveOperation
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