Skip to main content

Crate exint

Crate exint 

Source
Expand description

Exint - Exotic Integer Types


Notable Differences from primitive integer types

  • int<N> and uint<N> have an alignment of 1.

  • Some implementations of From and TryFrom are blocked by:

    • orphan rule
    • requiring support for generic_const_exprs or min_specialization
  • Overloadable operators require a nightly compiler to be used in const-fns

  • Literals must be constructed with the macros from exint-macro (eg. uint!).


Modules§

primitive
Integer type-aliases.

Macros§

uint
Create a generic integer from a literal expression.
uint_be
Similar to uint! but always generates code in big-endian format.
uint_le
Similar to uint! but always generates code in little-endian format.
uint_strict
Similar to uint! but don’t convert the built-in integer types (eg. u8, u32, i64).
uint_strict_be
Similar to uint_strict! but always generates code in big-endian format.
uint_strict_le
Similar to uint_strict! but always generates code in little-endian format.

Structs§

ParseIntError
An error which can be returned when parsing an integer.
Saturating
Provides intentionally-saturating arithmetic on T.
TryFromCharError
The error type returned when a checked char conversion fails.
TryFromIntError
The error type returned when a checked integral type conversion fails.
Wrapping
Provides intentionally-wrapped arithmetic on T.
int
The generic signed integer type.
uint
The generic unsigned integer type.

Enums§

IntErrorKind
Enum to store the various types of errors that can cause parsing an integer to fail.