AbstractCoroutineContextKey

constructor(baseKey: CoroutineContext.Key<B>, safeCast: (element: CoroutineContext.Element) -> E?)(source)

Parameters

B

base class of a polymorphic element

baseKey

an instance of base key

E

element type associated with the current key

safeCast

a function that can safely cast abstract CoroutineContext.Element to the concrete E type and return the element if it is a subtype of E or null otherwise.