asContribution

inline fun <T : Any> Any.asContribution(): T(source)

Casts this graph instance as the expected contribution type T. This is useful for cases where you want to upcast a merged graph to an expected contribution type.

This is validated at compile-time to prevent unexpected casts.

This is not necessary if you enable IDE support.

See also