const Frame({ required this.type, required this.payload, }) : assert(type >= 0 && type <= 0xFF, 'Frame type must fit in 1 byte'), assert(payload.length <= 0xFFFF, 'Payload length must fit in uint16');