pub struct EconomicsOrientation {
pub edited: bool,
pub requests: u64,
pub tool_calls: u64,
pub reads: u64,
pub searches: u64,
pub tokens: u64,
}Expand description
What a session did before its first edit: the cost of getting oriented.
use majordomus_cli::economics::model::EconomicsOrientation;
let none = EconomicsOrientation::default();
assert!(!none.edited && none.requests == 0 && none.tokens == 0);
let o = EconomicsOrientation {
edited: true, requests: 4, tool_calls: 6, reads: 4, searches: 1, tokens: 52_000,
};
assert!(o.reads + o.searches <= o.tool_calls, "reads and searches are tool calls");Fields§
§edited: boolWhether the session edited anything at all.
requests: u64Provider requests before the first edit.
tool_calls: u64Tool calls before the first edit.
reads: u64File reads before the first edit.
searches: u64Searches (grep, glob, find) before the first edit.
tokens: u64Total tokens of the requests before the first edit.
Trait Implementations§
Source§impl Clone for EconomicsOrientation
impl Clone for EconomicsOrientation
Source§fn clone(&self) -> EconomicsOrientation
fn clone(&self) -> EconomicsOrientation
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 EconomicsOrientation
impl Debug for EconomicsOrientation
Source§impl Default for EconomicsOrientation
impl Default for EconomicsOrientation
Source§fn default() -> EconomicsOrientation
fn default() -> EconomicsOrientation
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for EconomicsOrientation
impl<'de> Deserialize<'de> for EconomicsOrientation
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 EconomicsOrientation
Source§impl JsonSchema for EconomicsOrientation
impl JsonSchema for EconomicsOrientation
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 EconomicsOrientation
impl PartialEq for EconomicsOrientation
Source§fn eq(&self, other: &EconomicsOrientation) -> bool
fn eq(&self, other: &EconomicsOrientation) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for EconomicsOrientation
impl Serialize for EconomicsOrientation
impl StructuralPartialEq for EconomicsOrientation
Auto Trait Implementations§
impl Freeze for EconomicsOrientation
impl RefUnwindSafe for EconomicsOrientation
impl Send for EconomicsOrientation
impl Sync for EconomicsOrientation
impl Unpin for EconomicsOrientation
impl UnsafeUnpin for EconomicsOrientation
impl UnwindSafe for EconomicsOrientation
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.