Feature gate: #![feature(nonzero_bitwise)]
ACP: rust-lang/libs-team#413
This is a tracking issue for bitwise and bytewise methods on NonZero. When used on a non-zero integer, these methods result in a non-zero integer, so can take the form fn(self) -> Self.
Public API
// core::num
impl<T> NonZero<T> {
pub fn reverse_bits(self) -> Self;
pub fn rotate_left(self) -> Self;
pub fn rotate_right(self) -> Self;
pub fn swap_bytes(self) -> Self;
pub fn to_be(self) -> Self;
pub fn to_le(self) -> Self;
pub fn from_be(x: Self) -> Self;
pub fn from_le(x: Self) -> Self;
}
Steps / History
Unresolved Questions
Feature gate:
#![feature(nonzero_bitwise)]ACP: rust-lang/libs-team#413
This is a tracking issue for bitwise and bytewise methods on
NonZero. When used on a non-zero integer, these methods result in a non-zero integer, so can take the formfn(self) -> Self.Public API
Steps / History
NonZero#128282Unresolved Questions
Footnotes
https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html ↩