12 stable releases
1.4.1 | May 31, 2023 |
---|---|
1.4.0 | Apr 20, 2023 |
1.3.2 | Jan 28, 2023 |
1.3.0 | Jul 9, 2022 |
1.0.1 | Sep 2, 2021 |
#1197 in Encoding
78 downloads per month
21KB
316 lines
The hex-wrapper
is a collection of wrappers of the convertion between numbers and hex strings.
See the docs.rs for usages.
lib.rs
:
hex-wrapper
provides N-bit unsigned hexadecimal numbers.
Roughly speaking, Hex converts between uN
and (lowercase) String
hexadecimally.
Features
Defaults are all off.
rand
: Enables random constructorsHexN::rand()
orHexN::with_rng()
.serde
: Enables conversion used inserde
(e.g. for json).db
: Enables implementations ofdiesel
v1.4 traits.
Traits
Each hex trait implements the following traits:
Default
(only forHexN
, not forNonZeroHexN
);FromStr
;TryFrom<&str>
;Debug
;Display
(henceToString
automatically);Into<String>
and converselyString
implementsFrom<HexN>
;Serialize
andDeserialize
(only when theserde
feature enabled).
Dependencies
~0–790KB
~15K SLoC