The enum variants are the same, they've just been flattened. So you should move everything in the match cmsg { ... } directly into the match msg { ... }, and remove the MavMessage::common(ref cmsg) => ... arm.
can you please tell me how can I resolve this error
let msg = MavMessage::common(MavCommon::SET_GPS_GLOBAL_ORIGIN(data)); // Updated this argument also
| ^^^^^^ variant or associated item not found in `MavMessage`
I tried looking into the documentation and they have SET_GPS_GLOBAL_ORIGIN_DATA but they are different .
Replace MavMessage::common(MavCommon::SET_GPS_GLOBAL_ORIGIN(data)) with MavMessage::SET_GPS_GLOBAL_ORIGIN(data), and change the type of data from common::SET_GPS_GLOBAL_ORIGIN_DATA to ardupilotmega::SET_GPS_GLOBAL_ORIGIN_DATA. The documentation for 0.11.0 includes an extra extension field that the documentation for 0.9.0 excluded, but you won't actually see that in your code unless you enable the emit-extensions feature.