object CompleteIfSome extends Decoration[Any, Any, Nothing]
A h8io.stages.base.Decoration that stops the pipeline as soon as the decorated stage produces an output value.
CompleteIfSome appends h8io.stages.std.Complete after the decorated stage via ~>. If the stage yields
h8io.stages.Yield.Some, Complete immediately emits h8io.stages.Status.Complete, terminating the pipeline. If
the stage yields h8io.stages.Yield.None, Complete is not reached and the pipeline continues normally.
The singleton operates on Stage[Any, Any, Nothing] and can be cast to any concrete Decoration[I, O, E] via
apply[I, O, E].
Example:
val stage: Stage[Int, Int, Nothing] = ... val completing: Stage[Int, Int, Nothing] = CompleteIfSome(stage) // Once stage produces a value, the pipeline stops.
- Source
- CompleteIfSome.scala
- Alphabetic
- By Inheritance
- CompleteIfSome
- Function1
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def andThen[A](g: (Stage[Any, Any, Nothing]) => A): (Stage[Any, Any, Nothing]) => A
- Definition Classes
- Function1
- Annotations
- @unspecialized()
- def apply(stage: Stage[Any, Any, Nothing]): Stage[Any, Any, Nothing]
- Definition Classes
- CompleteIfSome → Function1
- def apply[I, O, E]: Decoration[I, O, E]
Returns a typed view of this singleton as a
Decoration[I, O, E].Returns a typed view of this singleton as a
Decoration[I, O, E].- I
the input type
- O
the output type
- E
the error type
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- def compose[A](g: (A) => Stage[Any, Any, Nothing]): (A) => Stage[Any, Any, Nothing]
- Definition Classes
- Function1
- Annotations
- @unspecialized()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- Function1 → AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)