pub enum StateScope {
Thread,
Run,
ToolCall,
}Expand description
Lifecycle scope of a StateSpec type.
Determines when the framework automatically resets the state:
Thread— persists across runs, never automatically cleaned. Examples: reminders, permission overrides, delegation records.Run— reset at the start of each run (inprepare_run). Examples: run lifecycle state, per-run token counters.ToolCall— scoped to a single tool call, cleaned up after execution. Examples: tool-call progress, suspended-call state.
Variants§
Thread
State that persists across runs (thread lifetime).
Run
State that is reset at the start of each run.
ToolCall
State that is scoped to a single tool call.
Trait Implementations§
Source§impl Clone for StateScope
impl Clone for StateScope
Source§fn clone(&self) -> StateScope
fn clone(&self) -> StateScope
Returns a duplicate of the value. Read more
1.0.0 · 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 StateScope
impl Debug for StateScope
Source§impl<'de> Deserialize<'de> for StateScope
impl<'de> Deserialize<'de> for StateScope
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<StateScope, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<StateScope, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for StateScope
impl Hash for StateScope
Source§impl PartialEq for StateScope
impl PartialEq for StateScope
Source§impl Serialize for StateScope
impl Serialize for StateScope
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for StateScope
impl Eq for StateScope
impl StructuralPartialEq for StateScope
Auto Trait Implementations§
impl Freeze for StateScope
impl RefUnwindSafe for StateScope
impl Send for StateScope
impl Sync for StateScope
impl Unpin for StateScope
impl UnsafeUnpin for StateScope
impl UnwindSafe for StateScope
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.