Expand description
deranged
is a proof-of-concept implementation of ranged integers.
Modules§
- traits 🔒Declaration and implementation of traits used for const assertions.
- Declaration and implementation of
Unsafe
, which ensures all unsafe operations are correctly placed in unsafe blocks.
Macros§
- article 🔒
"A"
iftrue
,"An"
iffalse
. ?
forOption
types, usable inconst
contexts.- Output the provided code if and only if the list does not include
rand_09
. - Output the given tokens if the type is signed, otherwise output nothing.
- Output the given tokens if the type is unsigned, otherwise output nothing.
- Implement a ranged integer type.
Option::unwrap_unchecked
, but usable inconst
contexts.
Structs§
- An optional
RangedI8
; similar toOption<RangedI8>
with better optimization. - An optional
RangedI16
; similar toOption<RangedI16>
with better optimization. - An optional
RangedI32
; similar toOption<RangedI32>
with better optimization. - An optional
RangedI64
; similar toOption<RangedI64>
with better optimization. - An optional
RangedI128
; similar toOption<RangedI128>
with better optimization. - An optional
RangedIsize
; similar toOption<RangedIsize>
with better optimization. - An optional
RangedU8
; similar toOption<RangedU8>
with better optimization. - An optional
RangedU16
; similar toOption<RangedU16>
with better optimization. - An optional
RangedU32
; similar toOption<RangedU32>
with better optimization. - An optional
RangedU64
; similar toOption<RangedU64>
with better optimization. - An optional
RangedU128
; similar toOption<RangedU128>
with better optimization. - An optional
RangedUsize
; similar toOption<RangedUsize>
with better optimization. - An error which can be returned when parsing an integer.
- An
i8
that is known to be in the rangeMIN..=MAX
. - An
i16
that is known to be in the rangeMIN..=MAX
. - An
i32
that is known to be in the rangeMIN..=MAX
. - An
i64
that is known to be in the rangeMIN..=MAX
. - An
i128
that is known to be in the rangeMIN..=MAX
. - An
isize
that is known to be in the rangeMIN..=MAX
. - A
u8
that is known to be in the rangeMIN..=MAX
. - A
u16
that is known to be in the rangeMIN..=MAX
. - A
u32
that is known to be in the rangeMIN..=MAX
. - A
u64
that is known to be in the rangeMIN..=MAX
. - A
u128
that is known to be in the rangeMIN..=MAX
. - A
usize
that is known to be in the rangeMIN..=MAX
. - The error type returned when a checked integral type conversion fails.
Functions§
- assert_
unchecked 🔒 ⚠Informs the optimizer that a condition is always true. If the condition is false, the behavior is undefined.