Skip to main content

rskit_process/persistent/
types.rs

1use std::time::Duration;
2
3use super::PersistentProcess;
4
5/// Captured output retained while waiting for persistent readiness.
6#[derive(Debug, Clone)]
7pub struct PersistentStartup {
8    /// Captured stdout at the moment readiness completed.
9    pub stdout: String,
10    /// Captured stdout bytes at the moment readiness completed.
11    pub stdout_bytes: Vec<u8>,
12    /// Captured stderr at the moment readiness completed.
13    pub stderr: String,
14    /// Captured stderr bytes at the moment readiness completed.
15    pub stderr_bytes: Vec<u8>,
16    /// Whether stdout capture exceeded the configured limit before readiness.
17    pub stdout_truncated: bool,
18    /// Whether stderr capture exceeded the configured limit before readiness.
19    pub stderr_truncated: bool,
20    /// Time elapsed from spawn until readiness completed.
21    pub duration: Duration,
22}
23
24/// Result of starting a persistent process.
25#[derive(Debug)]
26pub struct PersistentRun {
27    /// Startup output captured while waiting for readiness.
28    pub startup: PersistentStartup,
29    /// Running persistent process handle.
30    pub process: PersistentProcess,
31}