Attributes
- Companion
- trait
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
LiftToResult.type
Members list
Type members
Types
Type alias for Either[Throwable, *], provided so that LiftToResult can be instantiated for this 1-parameter shape without requiring kind-projector.
Type alias for Either[Throwable, *], provided so that LiftToResult can be instantiated for this 1-parameter shape without requiring kind-projector.
Attributes
Value members
Concrete methods
Creates a LiftToResult instance for scala.Option: Some(a) lifts to Right(a); None lifts to Left(onNone).
Creates a LiftToResult instance for scala.Option: Some(a) lifts to Right(a); None lifts to Left(onNone).
There is no implicit instance for Option because there is no canonical error for the empty case — callers must supply the error explicitly.
Value parameters
- onNone
-
the error returned when the option is empty
Attributes
Implicits
Implicits
Lifts Either[Throwable, A] into Result[A] by converting any Left throwable into an org.llm4s.error.LLMError using org.llm4s.error.ThrowableOps.RichThrowable#toLLMError with the org.llm4s.core.safety.DefaultErrorMapper.
Lifts Either[Throwable, A] into Result[A] by converting any Left throwable into an org.llm4s.error.LLMError using org.llm4s.error.ThrowableOps.RichThrowable#toLLMError with the org.llm4s.core.safety.DefaultErrorMapper.
This instance is useful when integrating with Java or Try-based code that surfaces failures as Throwable rather than a typed error.
Attributes
cats.Id always succeeds — wraps the value in Right.
cats.Id always succeeds — wraps the value in Right.
Attributes
Lifts scala.util.Try[A] into Result[A]: Success(a) becomes Right(a); Failure(t) converts the throwable to an org.llm4s.error.LLMError using org.llm4s.error.ThrowableOps.RichThrowable#toLLMError with the org.llm4s.core.safety.DefaultErrorMapper.
Lifts scala.util.Try[A] into Result[A]: Success(a) becomes Right(a); Failure(t) converts the throwable to an org.llm4s.error.LLMError using org.llm4s.error.ThrowableOps.RichThrowable#toLLMError with the org.llm4s.core.safety.DefaultErrorMapper.