koneLocalUnwrap

fun KoneContextRegistry.koneLocalUnwrap(vararg keys: RegistryKey<out KoneContext>)(source)

This function is a stub that is replaced at compile time by the Kone contexts compiler plugin. It "unwraps" values corresponding to the specified keys in the KoneContextRegistry receiver.

"Unwrapping" means that the instance is used as a local context and all its included properties are unwrapped as well. A property is considered as included if it is marked with KoneContextInclude which is not overrided by KoneContextExclude (i.e. it does not have override property with the KoneContextExclude annotaition),

The properties to use during the unwrapping are found statically (i.e. by compiler by the provided type), but not dynamically (i.e. not by the actual type that is a subtype of the provided type).

Receiver

The KoneContextRegistry which values to retrieve and to unwrap.

Parameters

keys

The registry keys identifying which values to unwrap.

Throws

Always thrown at runtime; this function must be transformed by the Kone contexts compiler plugin before execution.


@JvmName(name = "koneLocalUnwrapContextual")
context(koneContextRegistry: KoneContextRegistry)
fun koneLocalUnwrap(vararg keys: RegistryKey<out KoneContext>)(source)

This function is a stub that is replaced at compile time by the Kone contexts compiler plugin. It "unwraps" values corresponding to the specified keys in the KoneContextRegistry context parameter.

"Unwrapping" means that the instance is used as a local context and all its included properties are unwrapped as well. A property is considered as included if it is marked with KoneContextInclude which is not overrided by KoneContextExclude (i.e. it does not have override property with the KoneContextExclude annotaition),

The properties to use during the unwrapping are found statically (i.e. by compiler by the provided type), but not dynamically (i.e. not by the actual type that is a subtype of the provided type).

Context Parameters

koneContextRegistry

The KoneContextRegistry which values to retrieve and to unwrap.

Parameters

keys

The registry keys identifying which values to unwrap.

Throws

Always thrown at runtime; this function must be transformed by the Kone contexts compiler plugin before execution.