Failure

zio.prelude.ZValidation.Failure
final case class Failure[+W, +E](log: Chunk[W], errors: NonEmptyChunk[E]) extends ZValidation[W, E, Nothing]

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait ZValidation[W, E, Nothing]
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

final def &>[W1 >: W, E1 >: E, B](that: ZValidation[W1, E1, B]): ZValidation[W1, E1, B]

A symbolic alias for zipParRight.

A symbolic alias for zipParRight.

Attributes

Inherited from:
ZValidation
final def <&[W1 >: W, E1 >: E, B](that: ZValidation[W1, E1, B]): ZValidation[W1, E1, Nothing]

A symbolic alias for zipParLeft.

A symbolic alias for zipParLeft.

Attributes

Inherited from:
ZValidation
final def <&>[W1 >: W, E1 >: E, B](that: ZValidation[W1, E1, B])(implicit zippable: Zippable[Nothing, B]): ZValidation[W1, E1, zippable.Out]

A symbolic alias for zipPar.

A symbolic alias for zipPar.

Attributes

Inherited from:
ZValidation
final def ??[W1 >: W](w1: W1): ZValidation[W1, E, Nothing]

A symbolic alias for log.

A symbolic alias for log.

Attributes

Inherited from:
ZValidation
final def as[B](b: B): ZValidation[W, E, B]

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

Inherited from:
ZValidation
final def asError[E2](e: E2): ZValidation[W, E2, Nothing]

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

Inherited from:
ZValidation
final override def equals(that: Any): Boolean

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
ZValidation -> Any
Inherited from:
ZValidation
final def flatMap[W1 >: W, E1 >: E, B](f: Nothing => ZValidation[W1, E1, B]): ZValidation[W1, E1, B]

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

Inherited from:
ZValidation
final def flatten[W1 >: W, E1 >: E, B](implicit ev1: Nothing <:< ZValidation[W1, E1, B]): ZValidation[W1, E1, B]

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

Inherited from:
ZValidation
final def fold[B](failure: (NonEmptyChunk[E]) => B, success: Nothing => B): B

Folds over the error and success values of this ZValidation.

Folds over the error and success values of this ZValidation.

Attributes

Inherited from:
ZValidation
final def forEach[F[_] : Covariant, B](f: Nothing => F[B]): F[ZValidation[W, E, B]]

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

Inherited from:
ZValidation
final def get(implicit ev: E <:< Nothing): Nothing

Returns the value, because no error has occurred.

Returns the value, because no error has occurred.

Attributes

Inherited from:
ZValidation
final def getLog: Chunk[W]

Returns the value of the log.

Returns the value of the log.

Attributes

Inherited from:
ZValidation
final def getOrElse[A1](fallback: => A1): A1

Returns the value, if successful, or the provided fallback value.

Returns the value, if successful, or the provided fallback value.

Attributes

Inherited from:
ZValidation
final def getOrElseWith[A1](f: (NonEmptyChunk[E]) => A1): A1

Returns the successful value or handles the errors that have accumulated.

Returns the successful value or handles the errors that have accumulated.

Attributes

Inherited from:
ZValidation
final override def hashCode(): Int

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
ZValidation -> Any
Inherited from:
ZValidation
final def log[W1 >: W](w1: W1): ZValidation[W1, E, Nothing]

Writes an entry to the log.

Writes an entry to the log.

Attributes

Inherited from:
ZValidation
final def map[B](f: Nothing => B): ZValidation[W, E, B]

Transforms the successful value of this ZValidation with the specified function.

Transforms the successful value of this ZValidation with the specified function.

Attributes

Inherited from:
ZValidation
final def mapError[E2](f: E => E2): ZValidation[W, E2, Nothing]

Transforms the error value of this ZValidation with the specified function.

Transforms the error value of this ZValidation with the specified function.

Attributes

Inherited from:
ZValidation
final def mapErrorAll[E2](f: (NonEmptyChunk[E]) => NonEmptyChunk[E2]): ZValidation[W, E2, Nothing]

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

Inherited from:
ZValidation
final def mapLog[W2](f: W => W2): ZValidation[W2, E, Nothing]

Transforms the log entries of this ZValidation with the specified function.

Transforms the log entries of this ZValidation with the specified function.

Attributes

Inherited from:
ZValidation
final def mapLogAll[W2](f: (Chunk[W]) => Chunk[W2]): ZValidation[W2, E, Nothing]

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

Inherited from:
ZValidation
final def orElse[W1 >: W, E1, A1](that: ZValidation[W1, E1, A1]): ZValidation[W1, E1, A1]

Attributes

Inherited from:
ZValidation
final def orElseLog[W1 >: W, E1, A1](that: ZValidation[W1, E1, A1])(implicit ev: E <:< W1): ZValidation[W1, E1, A1]

Attributes

Inherited from:
ZValidation

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product
final def runLog[B]: (Chunk[W], Either[NonEmptyChunk[E], Nothing])

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

Inherited from:
ZValidation
final def tap[W1 >: W, E1 >: E](f: Nothing => ZValidation[W1, E1, Any]): ZValidation[W1, E1, Nothing]

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

Inherited from:
ZValidation
final def toEither: Either[NonEmptyChunk[E], Nothing]

Transforms this ZValidation to an Either, discarding the log.

Transforms this ZValidation to an Either, discarding the log.

Attributes

Inherited from:
ZValidation
final def toEitherAssociative[E1 >: E](implicit A: Associative[E1]): Either[E1, Nothing]

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

Inherited from:
ZValidation
final def toEitherMultiSet: Either[NonEmptyMultiSet[E], Nothing]

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

Inherited from:
ZValidation
final def toEitherWith[E2](f: (NonEmptyChunk[E]) => E2): Either[E2, Nothing]

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

Inherited from:
ZValidation
final def toOption: Option[Nothing]

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

Inherited from:
ZValidation
final def toTry(implicit ev: E <:< Throwable): Try[Nothing]

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

Inherited from:
ZValidation
final def toZIO: IO[E, Nothing]

Converts this ZValidation into a ZIO effect, discarding the log.

Converts this ZValidation into a ZIO effect, discarding the log.

Attributes

Inherited from:
ZValidation
final def toZIOAssociative[E1 >: E](implicit A: Associative[E1]): IO[E1, Nothing]

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

Inherited from:
ZValidation
final def toZIOParallelErrors: IO[NonEmptyChunk[E], Nothing]

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

Inherited from:
ZValidation
final def unit: ZValidation[W, E, Unit]

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

Inherited from:
ZValidation
final def zipPar[W1 >: W, E1 >: E, B](that: ZValidation[W1, E1, B])(implicit zippable: Zippable[Nothing, B]): ZValidation[W1, E1, zippable.Out]

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

Inherited from:
ZValidation
final def zipParLeft[W1 >: W, E1 >: E, B](that: ZValidation[W1, E1, B]): ZValidation[W1, E1, Nothing]

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

Inherited from:
ZValidation
final def zipParRight[W1 >: W, E1 >: E, B](that: ZValidation[W1, E1, B]): ZValidation[W1, E1, B]

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

Inherited from:
ZValidation
final def zipWithPar[W1 >: W, E1 >: E, B, C](that: ZValidation[W1, E1, B])(f: (Nothing, B) => C): ZValidation[W1, E1, C]

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.

Attributes

Inherited from:
ZValidation

Concrete fields