Success

data class Success<TResult>(val result: TResult, val content: String) : SafeToolFromCallable.Result<TResult> (source)

Represents a successful result of an operation.

Parameters

TResult

The type of the result.

Constructors

Link copied to clipboard
constructor(result: TResult, content: String)

Properties

Link copied to clipboard
open override val content: String

Additional content or metadata associated with the operation result.

Link copied to clipboard

The result of the operation.

Functions

Link copied to clipboard

Casts the current Result instance to a Failure type.

Link copied to clipboard

Casts the current Result instance to Success<TResult>.

Link copied to clipboard
open fun isFailure(): Boolean

Checks whether the current instance represents a failure result.

Link copied to clipboard
open fun isSuccessful(): Boolean

Determines whether the current Result instance represents a successful outcome.