UnknownVariant

@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class UnknownVariant

Marks the single sealed-variant sink that a ForwardCompatible union skips unknown discriminators into. The marked variant must not carry PacketType — it is the else arm of dispatch, never matched by value — and its primary constructor must be (opcode: Int, raw: PlatformBuffer) (a ReadBuffer-typed raw is also accepted). For a varint discriminator the opcode parameter is instead the discriminator's own inner type (Long / ULong), carrying the full decoded type value — see ForwardCompatible requirement 3.

See also