pub struct TaskMetadata {Show 14 fields
pub task_type: TaskType,
pub agent_name: String,
pub created_at: String,
pub updated_at: Option<String>,
pub started_at: Option<String>,
pub completed_at: Option<String>,
pub execution_time_ms: Option<i64>,
pub tool_name: Option<String>,
pub mcp_server_name: Option<String>,
pub input_tokens: Option<u32>,
pub output_tokens: Option<u32>,
pub model: Option<String>,
pub execution_steps: Option<Vec<ExecutionStep>>,
pub extensions: Option<Map<String, Value>>,
}Fields§
§task_type: TaskType§agent_name: String§created_at: String§updated_at: Option<String>§started_at: Option<String>§completed_at: Option<String>§execution_time_ms: Option<i64>§tool_name: Option<String>§mcp_server_name: Option<String>§input_tokens: Option<u32>§output_tokens: Option<u32>§model: Option<String>§execution_steps: Option<Vec<ExecutionStep>>§extensions: Option<Map<String, Value>>Implementations§
Source§impl TaskMetadata
impl TaskMetadata
pub fn new_mcp_execution( agent_name: String, tool_name: String, mcp_server_name: String, ) -> Self
pub fn new_agent_message(agent_name: String) -> Self
pub const fn with_token_usage( self, input_tokens: u32, output_tokens: u32, ) -> Self
pub fn with_model(self, model: impl Into<String>) -> Self
pub fn with_updated_at(self) -> Self
pub fn with_tool_name(self, tool_name: impl Into<String>) -> Self
pub fn with_execution_steps(self, steps: Vec<ExecutionStep>) -> Self
pub fn with_extension(self, key: String, value: Value) -> Self
pub fn new_validated_agent_message(agent_name: String) -> ValidationResult<Self>
pub fn new_validated_mcp_execution( agent_name: String, tool_name: String, mcp_server_name: String, ) -> ValidationResult<Self>
Trait Implementations§
Source§impl Clone for TaskMetadata
impl Clone for TaskMetadata
Source§fn clone(&self) -> TaskMetadata
fn clone(&self) -> TaskMetadata
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 TaskMetadata
impl Debug for TaskMetadata
Source§impl<'de> Deserialize<'de> for TaskMetadata
impl<'de> Deserialize<'de> for TaskMetadata
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 MetadataValidation for TaskMetadata
impl MetadataValidation for TaskMetadata
fn required_string_fields(&self) -> Vec<(&'static str, &str)>
fn validate_required_fields(&self) -> Result<(), ValidationError>
Source§impl PartialEq for TaskMetadata
impl PartialEq for TaskMetadata
Source§impl Serialize for TaskMetadata
impl Serialize for TaskMetadata
Source§impl Validate for TaskMetadata
impl Validate for TaskMetadata
fn validate(&self) -> ValidationResult<()>
impl Eq for TaskMetadata
impl StructuralPartialEq for TaskMetadata
Auto Trait Implementations§
impl Freeze for TaskMetadata
impl RefUnwindSafe for TaskMetadata
impl Send for TaskMetadata
impl Sync for TaskMetadata
impl Unpin for TaskMetadata
impl UnwindSafe for TaskMetadata
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§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.