EventScopeProperty

class EventScopeProperty<V>(value: V)(source)

A property which wraps a variable of type V. Its value can only be mutated inside a MutableEventScope, which protects it from misuse.

See context-receivers/contextual-delegated-properties KEEP for why this isn't being used as a delegate yet.

Constructors

Link copied to clipboard
constructor(value: V)

Functions

Link copied to clipboard
fun get(): V

Returns the current value of this property.

Link copied to clipboard
fun set(value: V)

Mutates this property. This functions must be called in a MutableEventScope, therefore in a normal synchronous listener.