Attr

@Serializable
data class Attr(val key: String, val value: String) : Affinity

Satisfied when the peer advertises keyed capability key with exactly value.

Constructors

Link copied to clipboard
constructor(key: String, value: String)

Properties

Link copied to clipboard
val key: String
Link copied to clipboard

Functions

Link copied to clipboard
infix fun Affinity.and(other: Affinity): Affinity

Conjunction: a and b is satisfied when both this and other are.

Link copied to clipboard
open override fun matches(caps: CapSet): Boolean

Whether a peer advertising caps satisfies this predicate. Pure and deterministic.

Link copied to clipboard
infix fun Affinity.or(other: Affinity): Affinity

Disjunction: a or b is satisfied when either this or other is.