pub struct KernelState {
pub v: u32,
pub status: RunStatus,
pub step_no: u64,
pub steps: BTreeMap<String, StepState>,
pub closed_steps: u64,
pub usage_total: Usage,
}Expand description
Kernel-owned state persisted beside the user’s state and included in the state hash.
Terminal steps are pruned deterministically (closed_steps keeps the count) so the
structure stays bounded on long runs.
Fields§
§v: u32Format version of this structure; currently 1.
status: RunStatusRun-level status as the kernel derives it from the open steps.
step_no: u64Monotonic counter used to derive default step ids.
steps: BTreeMap<String, StepState>Open steps keyed by step id. Terminal steps are removed, not kept.
closed_steps: u64Number of steps pruned from steps so far.
usage_total: UsageUsage banked across every event of the run, retried attempts included.
Implementations§
Source§impl KernelState
impl KernelState
Trait Implementations§
Source§impl Clone for KernelState
impl Clone for KernelState
Source§fn clone(&self) -> KernelState
fn clone(&self) -> KernelState
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 moreSource§impl Debug for KernelState
impl Debug for KernelState
Source§impl Default for KernelState
impl Default for KernelState
Source§impl<'de> Deserialize<'de> for KernelState
impl<'de> Deserialize<'de> for KernelState
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 KernelState
Source§impl JsonSchema for KernelState
impl JsonSchema for KernelState
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for KernelState
impl PartialEq for KernelState
Source§fn eq(&self, other: &KernelState) -> bool
fn eq(&self, other: &KernelState) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for KernelState
impl Serialize for KernelState
impl StructuralPartialEq for KernelState
Auto Trait Implementations§
impl Freeze for KernelState
impl RefUnwindSafe for KernelState
impl Send for KernelState
impl Sync for KernelState
impl Unpin for KernelState
impl UnsafeUnpin for KernelState
impl UnwindSafe for KernelState
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