Package cloud.opencode.base.core.result
@NullMarked
package cloud.opencode.base.core.result
Result and response wrapper types for operation outcomes.
操作结果与响应封装类型。
- Since:
- JDK 25, opencode-base-core V1.0.3
- Author:
- Leon Soo
-
ClassDescriptionEither<L,
R> Either Monad - Represents one of two possible values (Left or Right) Either Monad - 表示两种可能值之一(Left 或 Right)Either.Left<L,R> Left - Represents the left case (typically error) Left - 表示左情况(通常为错误)Either.Right<L,R> Right - Represents the right case (typically success) Right - 表示右情况(通常为成功)Result<T>Result Monad - Represents the outcome of a computation that may succeed or fail Result Monad - 表示可能成功或失败的计算结果Failure - Represents a failed computation result Failure - 表示失败的计算结果Success - Represents a successful computation result Success - 表示成功的计算结果