pub struct RunState {
pub seq: u64,
pub pending_tool_ids: Vec<String>,
pub status: SessionStatus,
}Expand description
Run-state persisted with each checkpoint.
Contains everything needed to resume a session after a crash: the current sequence counter value, which tool calls are parked, and the session’s lifecycle status.
§Example
use adk_managed::checkpoint::RunState;
use adk_managed::types::SessionStatus;
let state = RunState {
seq: 5,
pending_tool_ids: vec!["ctu_001".to_string()],
status: SessionStatus::Running,
};
assert_eq!(state.seq, 5);
assert!(!state.pending_tool_ids.is_empty());Fields§
§seq: u64Current sequence counter value.
pending_tool_ids: Vec<String>IDs of custom tool calls that are currently parked (awaiting client response).
status: SessionStatusCurrent session status.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RunState
impl<'de> Deserialize<'de> for RunState
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
impl Eq for RunState
impl StructuralPartialEq for RunState
Auto Trait Implementations§
impl Freeze for RunState
impl RefUnwindSafe for RunState
impl Send for RunState
impl Sync for RunState
impl Unpin for RunState
impl UnsafeUnpin for RunState
impl UnwindSafe for RunState
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