pub struct SignalPaths {
pub dir: PathBuf,
}Expand description
信号目录/文件的解析。默认 %LOCALAPPDATA%\actl\。
Fields§
§dir: PathBufImplementations§
Source§impl SignalPaths
impl SignalPaths
pub fn display_lease(&self) -> Option<DisplayLease>
pub fn write_display<T: Serialize>(&self, name: &str, value: &T) -> Result<()>
pub fn acknowledged( &self, call: &str, action: u64, epoch: &str, since: u64, ) -> bool
Source§impl SignalPaths
impl SignalPaths
pub fn at(dir: impl Into<PathBuf>) -> Self
pub fn state_file(&self) -> PathBuf
pub fn stop_file(&self) -> PathBuf
Sourcepub fn write_state(&self, st: &SessionState)
pub fn write_state(&self, st: &SessionState)
状态快照落盘;诊断故障不改变业务结果,但写入独立健康记录。
Sourcepub fn read_calls(&self) -> Vec<SessionState>
pub fn read_calls(&self) -> Vec<SessionState>
Recent call snapshots, bounded retention; active calls are never evicted.
pub fn read_state(&self) -> Option<SessionState>
Source§impl SignalPaths
impl SignalPaths
pub fn execution_status(&self) -> Value
pub fn execution_generation(&self) -> Result<String, CtlError>
pub fn stop_requested(&self) -> bool
pub fn request_stop(&self) -> Result<(), CtlError>
pub fn request_stop_from( &self, source: &str, epoch: Option<&str>, ) -> Result<(), CtlError>
Sourcepub fn acknowledge_stop(&self, expected: &str) -> Result<(), CtlError>
pub fn acknowledge_stop(&self, expected: &str) -> Result<(), CtlError>
Only an explicit user’s Start for this generation may acknowledge the stop.
Sourcepub fn recover_execution(&self) -> Result<Value, CtlError>
pub fn recover_execution(&self) -> Result<Value, CtlError>
Explicit recovery: invalidate callers and archive raw state; no consent or resume.
pub fn stop_record(&self) -> Option<StopRecord>
pub fn stop_timestamp(&self) -> Option<u64>
pub fn stop_details(&self) -> String
Trait Implementations§
Source§impl Clone for SignalPaths
impl Clone for SignalPaths
Source§impl Debug for SignalPaths
impl Debug for SignalPaths
Auto Trait Implementations§
impl Freeze for SignalPaths
impl RefUnwindSafe for SignalPaths
impl Send for SignalPaths
impl Sync for SignalPaths
impl Unpin for SignalPaths
impl UnsafeUnpin for SignalPaths
impl UnwindSafe for SignalPaths
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