1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//! SIMD-accelerated hex encoding and decoding.
//!
//! # Examples
//!
//! ```
//! use hex_simd::AsciiCase;
//!
//! let bytes = b"Hello world!";
//!
//! let encoded = hex_simd::encode_to_boxed_str(bytes, AsciiCase::Lower);
//! assert_eq!(&*encoded, "48656c6c6f20776f726c6421");
//!
//! let decoded = hex_simd::decode_to_boxed_bytes(encoded.as_bytes()).unwrap();
//! assert_eq!(&*decoded, bytes);
//! ```
//!

#![cfg_attr(not(any(feature = "std", test)), no_std)]
#![cfg_attr(feature = "unstable", feature(arm_target_feature))]
//
#![deny(clippy::all, clippy::cargo, missing_docs)]
#![warn(clippy::todo)]

#[cfg(feature = "alloc")]
extern crate alloc;

pub(crate) use simd_abstraction::common::hex as sa_hex;

pub use sa_hex::AsciiCase;
pub use simd_abstraction::tools::OutBuf;

mod error;
pub use self::error::Error;
pub(crate) use self::error::ERROR;

#[cfg(test)]
mod tests;

pub mod fallback;

#[macro_use]
mod generic;

pub mod arch;

mod auto;
pub use self::auto::*;

mod ext;
pub use self::ext::*;