W3cubDocs

/Kotlin

Effect

Platform and version requirements: JVM (1.3), JS (1.3), Native (1.3)
@ExperimentalContracts interface Effect

Represents an effect of a function invocation, either directly observable, such as the function returning normally, or a side-effect, such as the function's lambda parameter being called in place.

The inheritors are used in ContractBuilder to describe the contract of a function.

See Also

ConditionalEffect

SimpleEffect

CallsInPlace

Inheritors

Platform and version requirements: JVM (1.3), JS (1.3), Native (1.3)

CallsInPlace

An effect of calling a functional parameter in place.

interface CallsInPlace : Effect
Platform and version requirements: JVM (1.3), JS (1.3), Native (1.3)

ConditionalEffect

An effect of some condition being true after observing another effect of a function.

interface ConditionalEffect : Effect
Platform and version requirements: JVM (1.3), JS (1.3), Native (1.3)

SimpleEffect

An effect that can be observed after a function invocation.

interface SimpleEffect : Effect

© 2010–2020 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.contracts/-effect.html