This seems to be an instance of prometheus/pushgateway#344: if push_metrics is used with at least one empty grouping label, then 405 Method Not Allowed is returned.
Instructions for fixes seem to be provided for third-party libraries at https://github.com/prometheus/pushgateway/pull/346/files.
Regardless of this issue, thank you for the prometheus crate! I'm using it in a(n upcoming) PR to rustic, and it's always as great to use!