Feature

abstract class Feature<in A, out C : Any, F : Any>(keyName: String, requiredFeatures: List<Feature<*, *, *>>)

A feature is any code that can be installed into an object to improve its functionality.

Constructors

Feature
Link copied to clipboard
fun Feature(keyName: String, requiredFeatures: List<Feature<*, *, *>> = emptyList())

Functions

checkRequiredFeatures
Link copied to clipboard
fun checkRequiredFeatures()
install
Link copied to clipboard
abstract suspend fun A.install(scope: CoroutineScope, configuration: C.() -> Unit): F

Feature installation script

Properties

key
Link copied to clipboard
val key: AttributeKey<F>
requiredFeatures
Link copied to clipboard
val requiredFeatures: List<Feature<*, *, *>>

Inheritors

EventDispatcherFeature
Link copied to clipboard
GatewayFeature
Link copied to clipboard

Sources

jvm source
Link copied to clipboard