attributesOf

inline fun attributesOf(block: AttributesBuilder.() -> Unit): Attributes

Return a new set of attributes using AttributesBuilder.

Example

val attr1 = AttributeKey<String>("attribute 1")
val attr1 = AttributeKey<Int>("attribute 2")

val attrs = attributesOf {
attr1 to "value 1"
attr2 to 57
}