ZValidation represents either a success of type A or a collection of one or more errors of type E along with in either case a log with entries of type W. Unlike Either, ZValidation does not "short circuit" on failures and instead allows accumulating multiple errors. This can be particularly useful in validating data, where we want to attempt to validate all of the data and retain information about all errors that arose, rather than failing at the first error.
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
- Self type
-
Members list
Value members
Concrete methods
A symbolic alias for zipParRight.
A symbolic alias for zipParRight.
Attributes
A symbolic alias for zipParLeft.
A symbolic alias for zipParLeft.
Attributes
A symbolic alias for zipPar.
A symbolic alias for zipPar.
Attributes
A symbolic alias for log.
A symbolic alias for log.
Attributes
Maps the successful value of this ZValidation to the specified constant value.
Maps the successful value of this ZValidation to the specified constant value.
Attributes
Maps the error value of this ZValidation to the specified constant value.
Maps the error value of this ZValidation to the specified constant value.
Attributes
Returns whether this ZValidation and the specified ZValidation are equal to each other.
Returns whether this ZValidation and the specified ZValidation are equal to each other.
Attributes
- Definition Classes
-
Any
Transforms the value of this ZValidation with the specified validation function if it is a success or returns the value unchanged otherwise.
Transforms the value of this ZValidation with the specified validation function if it is a success or returns the value unchanged otherwise.
Attributes
Returns a ZValidation that is this ZValidation if failing or the inner ZValidation if the outer one succeeds. In particular, the sequential aspect of this combinator precludes combining error values of outer and inner ZValidations. This method can be used to "flatten" nested ZValidation.
Returns a ZValidation that is this ZValidation if failing or the inner ZValidation if the outer one succeeds. In particular, the sequential aspect of this combinator precludes combining error values of outer and inner ZValidations. This method can be used to "flatten" nested ZValidation.
Attributes
Folds over the error and success values of this ZValidation.
Folds over the error and success values of this ZValidation.
Attributes
Transforms the value of this ZValidation with the specified effectual function if it is a success or returns the value unchanged otherwise.
Transforms the value of this ZValidation with the specified effectual function if it is a success or returns the value unchanged otherwise.
Attributes
Returns the value, because no error has occurred.
Returns the value, because no error has occurred.
Attributes
Returns the value, if successful, or the provided fallback value.
Returns the value, if successful, or the provided fallback value.
Attributes
Returns the successful value or handles the errors that have accumulated.
Returns the successful value or handles the errors that have accumulated.
Attributes
Calculate a hash code value for the object.
Calculate a hash code value for the object.
The default hashing algorithm is platform dependent.
Note that it is allowed for two objects to have identical hash codes (o1.hashCode.equals(o2.hashCode)) yet not be equal (o1.equals(o2) returns false). A degenerate implementation could always return 0. However, it is required that if two objects are equal (o1.equals(o2) returns true) that they have identical hash codes (o1.hashCode.equals(o2.hashCode)). Therefore, when overriding this method, be sure to verify that the behavior is consistent with the equals method.
Attributes
- Returns
-
the hash code value for this object.
- Definition Classes
-
Any
Writes an entry to the log.
Writes an entry to the log.
Attributes
Transforms the successful value of this ZValidation with the specified function.
Transforms the successful value of this ZValidation with the specified function.
Attributes
Transforms the error value of this ZValidation with the specified function.
Transforms the error value of this ZValidation with the specified function.
Attributes
Transforms all the error values of this ZValidation with the specified function.
Transforms all the error values of this ZValidation with the specified function.
Attributes
Transforms the log entries of this ZValidation with the specified function.
Transforms the log entries of this ZValidation with the specified function.
Attributes
Transforms all the log entries of this ZValidation with the specified function.
Transforms all the log entries of this ZValidation with the specified function.
Attributes
Exposes the result of this validation function as either a Right with a success of type A or a Left with one or more errors of type E, along with the log.
Exposes the result of this validation function as either a Right with a success of type A or a Left with one or more errors of type E, along with the log.
Attributes
Applies the provided validation function to the successful value of this ZValidation without altering the result. This method can be used to execute side effects or additional validations that do not transform the primary value but may modify the log or error. If this ZValidation is a failure, it remains unchanged.
Applies the provided validation function to the successful value of this ZValidation without altering the result. This method can be used to execute side effects or additional validations that do not transform the primary value but may modify the log or error. If this ZValidation is a failure, it remains unchanged.
Attributes
Transforms this ZValidation to an Either, discarding the log.
Transforms this ZValidation to an Either, discarding the log.
Attributes
Transforms this ZValidation to an Either, aggregating errors using provided Associative instance, discarding the log.
Transforms this ZValidation to an Either, aggregating errors using provided Associative instance, discarding the log.
Attributes
Transforms this ZValidation to an Either, discarding the order in which the errors occurred and discarding the log.
Transforms this ZValidation to an Either, discarding the order in which the errors occurred and discarding the log.
Attributes
Transforms this ZValidation to an Either, transforming the accumulated errors and discarding the log.
Transforms this ZValidation to an Either, transforming the accumulated errors and discarding the log.
Attributes
Transforms this ZValidation to an Option, discarding information about the errors and log.
Transforms this ZValidation to an Option, discarding information about the errors and log.
Attributes
Transforms this ZValidation to a Try, discarding all but the first error and the log.
Transforms this ZValidation to a Try, discarding all but the first error and the log.
Attributes
Converts this ZValidation into a ZIO effect, discarding the log.
Converts this ZValidation into a ZIO effect, discarding the log.
Attributes
Transforms this ZValidation to an ZIO effect, aggregating errors using provided Associative instance, discarding the log.
Transforms this ZValidation to an ZIO effect, aggregating errors using provided Associative instance, discarding the log.
Attributes
Converts this ZValidation into a ZIO effect and exposes all parallel errors in a single call, discarding the log.
Converts this ZValidation into a ZIO effect and exposes all parallel errors in a single call, discarding the log.
Attributes
Transforms the successful output of this ZValidation into a Unit, effectively discarding the original success value while preserving any accumulated warnings or errors. This can be useful when the outcome of the validation process is not needed, but the side effects (e.g., logging or error accumulation) are important.
Transforms the successful output of this ZValidation into a Unit, effectively discarding the original success value while preserving any accumulated warnings or errors. This can be useful when the outcome of the validation process is not needed, but the side effects (e.g., logging or error accumulation) are important.
Attributes
Combines this ZValidation with the specified ZValidation, returning a tuple of their results. Returns either the combined result if both were successes or otherwise returns a failure with all errors.
Combines this ZValidation with the specified ZValidation, returning a tuple of their results. Returns either the combined result if both were successes or otherwise returns a failure with all errors.
Attributes
A variant of zipPar that keeps only the left success value, but returns a failure with all errors if either this ZValidation or the specified ZValidation fail.
A variant of zipPar that keeps only the left success value, but returns a failure with all errors if either this ZValidation or the specified ZValidation fail.
Attributes
A variant of zipPar that keeps only the right success value, but returns a failure with all errors if either this ZValidation or the specified ZValidation fail.
A variant of zipPar that keeps only the right success value, but returns a failure with all errors if either this ZValidation or the specified ZValidation fail.
Attributes
Combines this ZValidation with the specified ZValidation, using the function f to combine their success values. Returns either the combined result if both were successes or otherwise returns a failure with all errors.
Combines this ZValidation with the specified ZValidation, using the function f to combine their success values. Returns either the combined result if both were successes or otherwise returns a failure with all errors.