Struct nonzero_ext::literals::NonZeroLiteral
source · pub struct NonZeroLiteral<T: IntegerLiteral>(pub T);
Expand description
A representation of a non-zero literal. Used by the [nonzero!
] macro.
This struct has no use outside of this macro (even though it can be constructed by anyone).
It needs to exist to support the use of the [nonzero!
] macro in const expressions.
Tuple Fields§
§0: T
Implementations§
source§impl NonZeroLiteral<u8>
impl NonZeroLiteral<u8>
sourcepub const unsafe fn into_nonzero(self) -> NonZeroU8
pub const unsafe fn into_nonzero(self) -> NonZeroU8
source§impl NonZeroLiteral<u16>
impl NonZeroLiteral<u16>
sourcepub const unsafe fn into_nonzero(self) -> NonZeroU16
pub const unsafe fn into_nonzero(self) -> NonZeroU16
source§impl NonZeroLiteral<u32>
impl NonZeroLiteral<u32>
sourcepub const unsafe fn into_nonzero(self) -> NonZeroU32
pub const unsafe fn into_nonzero(self) -> NonZeroU32
source§impl NonZeroLiteral<u64>
impl NonZeroLiteral<u64>
sourcepub const unsafe fn into_nonzero(self) -> NonZeroU64
pub const unsafe fn into_nonzero(self) -> NonZeroU64
source§impl NonZeroLiteral<u128>
impl NonZeroLiteral<u128>
sourcepub const unsafe fn into_nonzero(self) -> NonZeroU128
pub const unsafe fn into_nonzero(self) -> NonZeroU128
source§impl NonZeroLiteral<usize>
impl NonZeroLiteral<usize>
sourcepub const unsafe fn into_nonzero(self) -> NonZeroUsize
pub const unsafe fn into_nonzero(self) -> NonZeroUsize
source§impl NonZeroLiteral<i8>
impl NonZeroLiteral<i8>
sourcepub const unsafe fn into_nonzero(self) -> NonZeroI8
pub const unsafe fn into_nonzero(self) -> NonZeroI8
source§impl NonZeroLiteral<i16>
impl NonZeroLiteral<i16>
sourcepub const unsafe fn into_nonzero(self) -> NonZeroI16
pub const unsafe fn into_nonzero(self) -> NonZeroI16
source§impl NonZeroLiteral<i32>
impl NonZeroLiteral<i32>
sourcepub const unsafe fn into_nonzero(self) -> NonZeroI32
pub const unsafe fn into_nonzero(self) -> NonZeroI32
source§impl NonZeroLiteral<i64>
impl NonZeroLiteral<i64>
sourcepub const unsafe fn into_nonzero(self) -> NonZeroI64
pub const unsafe fn into_nonzero(self) -> NonZeroI64
source§impl NonZeroLiteral<i128>
impl NonZeroLiteral<i128>
sourcepub const unsafe fn into_nonzero(self) -> NonZeroI128
pub const unsafe fn into_nonzero(self) -> NonZeroI128
source§impl NonZeroLiteral<isize>
impl NonZeroLiteral<isize>
sourcepub const unsafe fn into_nonzero(self) -> NonZeroIsize
pub const unsafe fn into_nonzero(self) -> NonZeroIsize
Auto Trait Implementations§
impl<T> Freeze for NonZeroLiteral<T>where
T: Freeze,
impl<T> RefUnwindSafe for NonZeroLiteral<T>where
T: RefUnwindSafe,
impl<T> Send for NonZeroLiteral<T>where
T: Send,
impl<T> Sync for NonZeroLiteral<T>where
T: Sync,
impl<T> Unpin for NonZeroLiteral<T>where
T: Unpin,
impl<T> UnwindSafe for NonZeroLiteral<T>where
T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more