packetField

inline fun <T> Any.packetField(fieldName: String): T

Convenience inline helper for reading a typed field from a packet object.

Equivalent to calling getFieldValue with a reified type parameter.

Parameters

fieldName

The name of the field to read.

Type Parameters

T

The expected type of the field value.