pub struct ExecutionRecord {Show 14 fields
pub key: String,
pub agent_name: String,
pub input_tokens: i64,
pub output_tokens: i64,
pub total_tokens: i64,
pub cost_sub_cents: i64,
pub model: Option<String>,
pub provider: Option<String>,
pub success: bool,
pub error_message: Option<String>,
pub latency_ms: Option<i64>,
pub started_at: String,
pub completed_at: Option<String>,
pub gitea_issue: Option<i64>,
}Expand description
Persistable record for individual execution history entries
Maps to the execution_history table in SQLite schema.
Fields§
§key: StringUnique identifier for this record (auto-generated from timestamp + agent)
agent_name: StringAgent name that executed
input_tokens: i64Input tokens consumed
output_tokens: i64Output tokens consumed
total_tokens: i64Total tokens (input + output)
cost_sub_cents: i64Cost in sub-cents
model: Option<String>Model used
provider: Option<String>Provider used
success: boolWhether execution succeeded
error_message: Option<String>Error message if failed
latency_ms: Option<i64>Latency in milliseconds
started_at: StringWhen execution started (RFC3339)
completed_at: Option<String>When execution completed (RFC3339)
gitea_issue: Option<i64>Associated Gitea issue number
Implementations§
Trait Implementations§
Source§impl Clone for ExecutionRecord
impl Clone for ExecutionRecord
Source§fn clone(&self) -> ExecutionRecord
fn clone(&self) -> ExecutionRecord
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 ExecutionRecord
impl Debug for ExecutionRecord
Source§impl<'de> Deserialize<'de> for ExecutionRecord
impl<'de> Deserialize<'de> for ExecutionRecord
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
Source§impl Persistable for ExecutionRecord
impl Persistable for ExecutionRecord
Source§fn save<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn save<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Save to all profiles
Source§fn save_to_one<'life0, 'life1, 'async_trait>(
&'life0 self,
profile_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save_to_one<'life0, 'life1, 'async_trait>(
&'life0 self,
profile_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Save to a single profile
Source§fn load<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Load a key from the fastest operator
fn get_key(&self) -> String
Source§fn load_config<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(HashMap<String, (Operator, u128)>, Operator), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn load_config<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(HashMap<String, (Operator, u128)>, Operator), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Load the configuration
Source§fn save_to_all<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn save_to_all<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Save to all profiles
Source§fn save_to_profile<'life0, 'life1, 'async_trait>(
&'life0 self,
profile_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: Sync + 'async_trait,
fn save_to_profile<'life0, 'life1, 'async_trait>(
&'life0 self,
profile_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: Sync + 'async_trait,
Save to a single profile
Source§fn load_from_operator<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 str,
_op: &'life2 Operator,
) -> Pin<Box<dyn Future<Output = Result<Self, Error>> + Send + 'async_trait>>
fn load_from_operator<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, key: &'life1 str, _op: &'life2 Operator, ) -> Pin<Box<dyn Future<Output = Result<Self, Error>> + Send + 'async_trait>>
Load from operators with fallback mechanism and cache warm-up Read more
fn normalize_key(&self, key: &str) -> String
Auto Trait Implementations§
impl Freeze for ExecutionRecord
impl RefUnwindSafe for ExecutionRecord
impl Send for ExecutionRecord
impl Sync for ExecutionRecord
impl Unpin for ExecutionRecord
impl UnsafeUnpin for ExecutionRecord
impl UnwindSafe for ExecutionRecord
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>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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