InspectResultExtension<T extends Object?, E extends Object> extension
Extension methods for inspecting result values without transforming them.
Useful for logging, debugging, or side effects while preserving the result. These methods allow you to peek at the value or error without consuming the result, enabling fluent method chaining.
- on
-
- Result<
T, E>
- Result<
Methods
-
inspectErr(
void block(E error)) → Result< T, E> -
Available on Result<
Executes a side effect if this is an error, then returns this unchanged.T, E> , provided by the InspectResultExtension extension -
inspectOk(
void block(T value)) → Result< T, E> -
Available on Result<
Executes a side effect if this is a success, then returns this unchanged.T, E> , provided by the InspectResultExtension extension