failure • Rust AI Agent SDK

failure: Create a failed result

failure

Method

</div>

This is a method of the ToolResult class in the tools module.

Create a failed result

Signature

python
def failure(name: impl Into<String>, error: impl Into<String>) -> Self

Parameters

ParamField impl Into&lt;String&gt;

No description available.

ParamField impl Into&lt;String&gt;

No description available.

Returns

ResponseField Self

The result of the operation.