FeatureBuilder

class FeatureBuilder<T>(val feature: Feature<T>, val configBuilder: T.(FeatureContext) -> Unit)

Class that stores necessary data for building a Feature.

This is the class used for storing information about how features are configured before building the app environment. For example, this...

tegral {
install(MyFeature)
install(MyOtherFeature) { /* ... */}
}

... would lead to two FeatureBuilder instances: one with MyFeature and a no-op configBuilder, one with MyOtherFeature and the provided lambda.

Constructors

Link copied to clipboard
constructor(feature: Feature<T>, configBuilder: T.(FeatureContext) -> Unit)

Properties

Link copied to clipboard

A lambda to call onto the feature. Used to configure the T object.

Link copied to clipboard

The feature to build