Package-level declarations
Types
Typealias for kotlin.Result, disambiguating it from other result-type classes in the same codebase.
Typealias for a Flow of KotlinResult values.
Properties
Wraps this value as a KotlinResult failure by converting it to a Throwable first. No exception catching.
Wraps this Throwable directly as a KotlinResult failure. No exception catching.
Wraps this value as a KotlinResult using result.
Wraps this value directly as a KotlinResult success. No exception catching.
Converts an Outcome to a KotlinResult.
Functions
Transforms the encapsulated value if this instance represents success, wrapping the success lambda in resultOf so that any thrown exception is re-encapsulated as a failure rather than propagating.
Awaits the Deferred and returns its result as a KotlinResult.
Collects a Collection of KotlinResult values into a single result.
Returns the encapsulated Throwable if failure, or defaultError if success.
Returns a Flow of unwrapped success values, dropping all failures from the original flow.
Applies transform to the encapsulated value if success, returning the KotlinResult produced by transform.
Flattens a nested KotlinResult.
Flattens a flow of nested KotlinResult values by applying flatten to each element.
Maps each element of the flow to Out by folding over its success or failure state. Equivalent to calling Result.fold on each element.
Wraps the result of block as a Result.failure.
Wraps throwable as a Result.failure.
Wraps value as a Result.success.
Wraps the result of block as a Result.success.
Wraps the result of block as a Result.success.
Invokes action with the unwrapped success value before each successful element is emitted downstream. Failures pass through unaffected.
Non-suspend runner that catches and encapsulates T and all thrown Exceptions as a KotlinResult.
Suspend runner that catches and encapsulates T and most thrown Exceptions as a KotlinResult.
Wraps this value as a KotlinResult based on predicate.