pub struct SubprocessStats {
pub usage_ptr: Option<String>,
pub model_ptr: Option<String>,
pub num_turns_ptr: Option<String>,
}Expand description
Declarative stats extraction for a SubprocessOutput — JSON
Pointers (RFC 6901) into the parsed stdout, mirroring the
result_ptr idiom. Lets a declared CLI backend (e.g. claude -p --output-format json, codex exec --json) surface token usage
without any engine-side backend branch. Same IN-immutability
discipline as the rest of this crate: pointers only, no logic.
Fields§
§usage_ptr: Option<String>JSON Pointer selecting a usage OBJECT out of the parsed stdout.
The engine reads input_tokens/output_tokens (falling back to
the OpenAI-style prompt_tokens/completion_tokens spelling)
and an optional total_tokens from it.
model_ptr: Option<String>JSON Pointer selecting the model name STRING that actually
served the run (overrides the template’s declared {model}
value in the recorded stats when present).
num_turns_ptr: Option<String>JSON Pointer selecting the number of LLM turns (a JSON number).
Trait Implementations§
Source§impl Clone for SubprocessStats
impl Clone for SubprocessStats
Source§fn clone(&self) -> SubprocessStats
fn clone(&self) -> SubprocessStats
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SubprocessStats
impl Debug for SubprocessStats
Source§impl<'de> Deserialize<'de> for SubprocessStats
impl<'de> Deserialize<'de> for SubprocessStats
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>,
impl Eq for SubprocessStats
Source§impl JsonSchema for SubprocessStats
impl JsonSchema for SubprocessStats
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for SubprocessStats
impl PartialEq for SubprocessStats
Source§impl Serialize for SubprocessStats
impl Serialize for SubprocessStats
impl StructuralPartialEq for SubprocessStats
Auto Trait Implementations§
impl Freeze for SubprocessStats
impl RefUnwindSafe for SubprocessStats
impl Send for SubprocessStats
impl Sync for SubprocessStats
impl Unpin for SubprocessStats
impl UnsafeUnpin for SubprocessStats
impl UnwindSafe for SubprocessStats
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more