Struct ToolSpan
pub struct ToolSpan {
pub name: String,
pub operation: String,
pub call_id: String,
pub tool_type: String,
pub error_type: Option<String>,
pub duration_ms: u64,
}Expand description
A single tool execution span (OTel GenAI aligned).
Fields§
§name: StringOTel: gen_ai.tool.name.
operation: StringOTel: gen_ai.operation.name.
call_id: StringOTel: gen_ai.tool.call.id.
tool_type: StringOTel: gen_ai.tool.type.
error_type: Option<String>OTel: error.type.
duration_ms: u64Implementations§
§impl ToolSpan
impl ToolSpan
pub fn is_success(&self) -> bool
Trait Implementations§
§impl<'de> Deserialize<'de> for ToolSpan
impl<'de> Deserialize<'de> for ToolSpan
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ToolSpan, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ToolSpan, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Serialize for ToolSpan
impl Serialize for ToolSpan
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for ToolSpan
impl RefUnwindSafe for ToolSpan
impl Send for ToolSpan
impl Sync for ToolSpan
impl Unpin for ToolSpan
impl UnwindSafe for ToolSpan
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