Expand description
deranged
is a proof-of-concept implementation of ranged integers.
Modulesยง
- traits ๐Declaration and implementation of traits used for const assertions.
- unsafe_
wrapper ๐Declaration and implementation ofUnsafe
, which ensures all unsafe operations are correctly placed in unsafe blocks.
Macrosยง
- article ๐
"A"
iftrue
,"An"
iffalse
. - const_
try_ ๐opt ?
forOption
types, usable inconst
contexts. - Output the provided code if and only if the list does not include
rand_09
. - if_
signed ๐Output the given tokens if the type is signed, otherwise output nothing. - if_
unsigned ๐Output the given tokens if the type is unsigned, otherwise output nothing. - impl_
ranged ๐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.