This was just stabilized in std; we should consider adding it too. https://github.com/rust-lang/rust/pull/64728