From 6bb970d8bf58560ede1691505d8fddba93e6d156 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Fri, 27 Feb 2026 13:28:44 +1100 Subject: [PATCH 01/15] Move hex macro down the file Currently the `hex` macro is placed in between the `pub mod` statements, this is a little surprising. Move the `hex` macro down the file after the public decoding functions. No logic change. --- src/lib.rs | 64 +++++++++++++++++++++++++++--------------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index cdaa233..1f50264 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -105,38 +105,6 @@ pub mod parse; #[cfg(feature = "serde")] pub mod serde; -/// Parses hex strings in const contexts. -/// -/// Returns `[u8; N]` arrays. The string must have even length. -#[macro_export] -macro_rules! hex { - ($hex:expr) => {{ - const _: () = assert!($hex.len() % 2 == 0, "hex string must have even length"); - - const fn decode_digit(digit: u8) -> u8 { - match digit { - b'0'..=b'9' => digit - b'0', - b'a'..=b'f' => digit - b'a' + 10, - b'A'..=b'F' => digit - b'A' + 10, - _ => panic!("invalid hex digit"), - } - } - - let mut output = [0u8; $hex.len() / 2]; - let bytes = $hex.as_bytes(); - - let mut i = 0; - while i < output.len() { - let high = decode_digit(bytes[i * 2]); - let low = decode_digit(bytes[i * 2 + 1]); - output[i] = (high << 4) | low; - i += 1; - } - - output - }}; -} - /// Re-exports of the common crate traits. pub mod prelude { #[doc(inline)] @@ -194,6 +162,38 @@ pub fn decode_to_array(hex: &str) -> Result<[u8; N], DecodeFixed } } +/// Parses hex strings in const contexts. +/// +/// Returns `[u8; N]` arrays. The string must have even length. +#[macro_export] +macro_rules! hex { + ($hex:expr) => {{ + const _: () = assert!($hex.len() % 2 == 0, "hex string must have even length"); + + const fn decode_digit(digit: u8) -> u8 { + match digit { + b'0'..=b'9' => digit - b'0', + b'a'..=b'f' => digit - b'a' + 10, + b'A'..=b'F' => digit - b'A' + 10, + _ => panic!("invalid hex digit"), + } + } + + let mut output = [0u8; $hex.len() / 2]; + let bytes = $hex.as_bytes(); + + let mut i = 0; + while i < output.len() { + let high = decode_digit(bytes[i * 2]); + let low = decode_digit(bytes[i * 2 + 1]); + output[i] = (high << 4) | low; + i += 1; + } + + output + }}; +} + /// Possible case of hex. #[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] pub enum Case { From 1bf09ef841b0b703ec20c4185ed1c4df230c8139 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Fri, 27 Feb 2026 13:34:57 +1100 Subject: [PATCH 02/15] Copy error module rustdocs from 1.0 Copy the `error` module rustdocs from the `1.x` branch. The `error` module is the same here on `master` except some unit test code which will be unified next. --- src/error.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/error.rs b/src/error.rs index b5f2c6e..d14d531 100644 --- a/src/error.rs +++ b/src/error.rs @@ -1,6 +1,10 @@ // SPDX-License-Identifier: CC0-1.0 -//! Error code for the `hex-conservative` crate. +//! The error types. +//! +//! These types are returned when hex decoding fails. The high-level ones are +//! [`DecodeFixedLengthBytesError`] and [`DecodeVariableLengthBytesError`] which represent all +//! possible ways in which hex decoding may fail in the two most common decoding scenarios. use core::convert::Infallible; use core::fmt; From 4dd137c8c7f00d989cf284b16972376f134a7349 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Fri, 27 Feb 2026 13:39:15 +1100 Subject: [PATCH 03/15] Use crate decoding functions in error unit tests Stop using `FromHex` and use the crate level decoding functions in the unit tests of the `error` module. With this applied (and hex 1.x branch checked out locally) the following is achieved: ``` diff src/error.rs ~/tmp/hex-1.0/hex-conservative/src/error.rs 69a70 > pub(crate) use write_err; 413,415c414 < use crate::decode_to_array; < #[cfg(feature = "alloc")] < use crate::decode_to_vec; --- > use crate::{decode_to_array, decode_to_vec}; ``` --- src/error.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/error.rs b/src/error.rs index d14d531..7d8373f 100644 --- a/src/error.rs +++ b/src/error.rs @@ -409,11 +409,10 @@ if_std_error! {{ #[cfg(test)] #[cfg(feature = "std")] mod tests { - #[cfg(feature = "alloc")] - use alloc::vec::Vec; - use super::*; - use crate::FromHex; + use crate::decode_to_array; + #[cfg(feature = "alloc")] + use crate::decode_to_vec; fn check_source(error: &T) { assert!(error.source().is_some()); @@ -422,7 +421,7 @@ mod tests { #[cfg(feature = "alloc")] #[test] fn invalid_char_error() { - let result = as FromHex>::from_hex("12G4"); + let result = decode_to_vec("12G4"); let error = result.unwrap_err(); if let DecodeVariableLengthBytesError::InvalidChar(e) = error { assert!(!format!("{}", e).is_empty()); @@ -436,7 +435,7 @@ mod tests { #[cfg(feature = "alloc")] #[test] fn odd_length_string_error() { - let result = as FromHex>::from_hex("123"); + let result = decode_to_vec("123"); let error = result.unwrap_err(); assert!(!format!("{}", error).is_empty()); check_source(&error); @@ -450,7 +449,7 @@ mod tests { #[test] fn invalid_length_error() { - let result = <[u8; 4] as FromHex>::from_hex("123"); + let result = decode_to_array::<4>("123"); let error = result.unwrap_err(); assert!(!format!("{}", error).is_empty()); check_source(&error); From 18b247961cb1fa2236014eff9dfee6d5b3ef928b Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Fri, 27 Feb 2026 13:51:38 +1100 Subject: [PATCH 04/15] Make parse module tests use crate level decoding functions Done in preparation for moving the test out of the `parse` module so we can delete the module. --- src/parse.rs | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/parse.rs b/src/parse.rs index 0c99fb0..32af19d 100644 --- a/src/parse.rs +++ b/src/parse.rs @@ -49,8 +49,7 @@ mod sealed { #[cfg(test)] mod tests { - use super::*; - use crate::{HexToBytesIter, InvalidLengthError}; + use crate::{decode_to_array, decode_to_vec, HexToBytesIter, InvalidLengthError}; #[test] #[cfg(feature = "alloc")] @@ -63,23 +62,23 @@ mod tests { let badchar3 = "«23456789abcdef"; assert_eq!( - Vec::::from_hex(oddlen).unwrap_err(), + decode_to_vec(oddlen).unwrap_err(), OddLengthStringError { len: 17 }.into() ); assert_eq!( - <[u8; 4]>::from_hex(oddlen).unwrap_err(), + decode_to_array::<4>(oddlen).unwrap_err(), InvalidLengthError { invalid: 17, expected: 8 }.into() ); assert_eq!( - Vec::::from_hex(badchar1).unwrap_err(), + decode_to_vec(badchar1).unwrap_err(), InvalidCharError { pos: 0, invalid: b'Z' }.into() ); assert_eq!( - Vec::::from_hex(badchar2).unwrap_err(), + decode_to_vec(badchar2).unwrap_err(), InvalidCharError { pos: 3, invalid: b'Y' }.into() ); assert_eq!( - Vec::::from_hex(badchar3).unwrap_err(), + decode_to_vec(badchar3).unwrap_err(), InvalidCharError { pos: 0, invalid: 194 }.into() ); } @@ -113,14 +112,14 @@ mod tests { #[test] fn hex_to_array() { let len_sixteen = "0123456789abcdef"; - assert!(<[u8; 8]>::from_hex(len_sixteen).is_ok()); + assert!(decode_to_array::<8>(len_sixteen).is_ok()); } #[test] fn hex_to_array_error() { let len_sixteen = "0123456789abcdef"; assert_eq!( - <[u8; 4]>::from_hex(len_sixteen).unwrap_err(), + decode_to_array::<4>(len_sixteen).unwrap_err(), InvalidLengthError { invalid: 16, expected: 8 }.into() ); } @@ -134,7 +133,7 @@ mod tests { let want_lower = "deadbeef0123"; let want_upper = "DEADBEEF0123"; - let v = Vec::::from_hex(s).expect("valid hex"); + let v = decode_to_vec(s).expect("valid hex"); assert_eq!(format!("{:x}", v.as_hex()), want_lower); assert_eq!(format!("{:X}", v.as_hex()), want_upper); } From b9ff231bad97b50e038b36ee0046f091ddd5ddd9 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Fri, 27 Feb 2026 13:53:12 +1100 Subject: [PATCH 05/15] Move unit test from parse to error In preparation for deleting the `parse` module (and clobbering the `FromHex` trait) move the unit test to `error` so its obvious we don't loose any test coverage. --- src/error.rs | 87 ++++++++++++++++++++++++++++++++++++++++++++++++- src/parse.rs | 92 ---------------------------------------------------- 2 files changed, 86 insertions(+), 93 deletions(-) diff --git a/src/error.rs b/src/error.rs index 7d8373f..b160540 100644 --- a/src/error.rs +++ b/src/error.rs @@ -410,7 +410,8 @@ if_std_error! {{ #[cfg(feature = "std")] mod tests { use super::*; - use crate::decode_to_array; + use crate::error::{InvalidCharError, OddLengthStringError}; + use crate::{decode_to_array, HexToBytesIter, InvalidLengthError}; #[cfg(feature = "alloc")] use crate::decode_to_vec; @@ -479,4 +480,88 @@ mod tests { assert!(!format!("{}", error).is_empty()); check_source(&error); } + + #[test] + #[cfg(feature = "alloc")] + fn hex_error() { + let oddlen = "0123456789abcdef0"; + let badchar1 = "Z123456789abcdef"; + let badchar2 = "012Y456789abcdeb"; + let badchar3 = "«23456789abcdef"; + + assert_eq!( + decode_to_vec(oddlen).unwrap_err(), + OddLengthStringError { len: 17 }.into() + ); + assert_eq!( + decode_to_array::<4>(oddlen).unwrap_err(), + InvalidLengthError { invalid: 17, expected: 8 }.into() + ); + assert_eq!( + decode_to_vec(badchar1).unwrap_err(), + InvalidCharError { pos: 0, invalid: b'Z' }.into() + ); + assert_eq!( + decode_to_vec(badchar2).unwrap_err(), + InvalidCharError { pos: 3, invalid: b'Y' }.into() + ); + assert_eq!( + decode_to_vec(badchar3).unwrap_err(), + InvalidCharError { pos: 0, invalid: 194 }.into() + ); + } + + #[test] + fn hex_error_position() { + let badpos1 = "Z123456789abcdef"; + let badpos2 = "012Y456789abcdeb"; + let badpos3 = "0123456789abcdeZ"; + let badpos4 = "0123456789abYdef"; + + assert_eq!( + HexToBytesIter::new(badpos1).unwrap().next().unwrap().unwrap_err(), + InvalidCharError { pos: 0, invalid: b'Z' } + ); + assert_eq!( + HexToBytesIter::new(badpos2).unwrap().nth(1).unwrap().unwrap_err(), + InvalidCharError { pos: 3, invalid: b'Y' } + ); + assert_eq!( + HexToBytesIter::new(badpos3).unwrap().next_back().unwrap().unwrap_err(), + InvalidCharError { pos: 15, invalid: b'Z' } + ); + assert_eq!( + HexToBytesIter::new(badpos4).unwrap().nth_back(1).unwrap().unwrap_err(), + InvalidCharError { pos: 12, invalid: b'Y' } + ); + } + + #[test] + fn hex_to_array() { + let len_sixteen = "0123456789abcdef"; + assert!(decode_to_array::<8>(len_sixteen).is_ok()); + } + + #[test] + fn hex_to_array_error() { + let len_sixteen = "0123456789abcdef"; + assert_eq!( + decode_to_array::<4>(len_sixteen).unwrap_err(), + InvalidLengthError { invalid: 16, expected: 8 }.into() + ); + } + + #[test] + #[cfg(feature = "alloc")] + fn mixed_case() { + use crate::display::DisplayHex as _; + + let s = "DEADbeef0123"; + let want_lower = "deadbeef0123"; + let want_upper = "DEADBEEF0123"; + + let v = decode_to_vec(s).expect("valid hex"); + assert_eq!(format!("{:x}", v.as_hex()), want_lower); + assert_eq!(format!("{:X}", v.as_hex()), want_upper); + } } diff --git a/src/parse.rs b/src/parse.rs index 32af19d..57ae0d3 100644 --- a/src/parse.rs +++ b/src/parse.rs @@ -46,95 +46,3 @@ mod sealed { impl Sealed for [u8; LEN] {} } - -#[cfg(test)] -mod tests { - use crate::{decode_to_array, decode_to_vec, HexToBytesIter, InvalidLengthError}; - - #[test] - #[cfg(feature = "alloc")] - fn hex_error() { - use crate::error::{InvalidCharError, OddLengthStringError}; - - let oddlen = "0123456789abcdef0"; - let badchar1 = "Z123456789abcdef"; - let badchar2 = "012Y456789abcdeb"; - let badchar3 = "«23456789abcdef"; - - assert_eq!( - decode_to_vec(oddlen).unwrap_err(), - OddLengthStringError { len: 17 }.into() - ); - assert_eq!( - decode_to_array::<4>(oddlen).unwrap_err(), - InvalidLengthError { invalid: 17, expected: 8 }.into() - ); - assert_eq!( - decode_to_vec(badchar1).unwrap_err(), - InvalidCharError { pos: 0, invalid: b'Z' }.into() - ); - assert_eq!( - decode_to_vec(badchar2).unwrap_err(), - InvalidCharError { pos: 3, invalid: b'Y' }.into() - ); - assert_eq!( - decode_to_vec(badchar3).unwrap_err(), - InvalidCharError { pos: 0, invalid: 194 }.into() - ); - } - - #[test] - fn hex_error_position() { - use crate::error::InvalidCharError; - let badpos1 = "Z123456789abcdef"; - let badpos2 = "012Y456789abcdeb"; - let badpos3 = "0123456789abcdeZ"; - let badpos4 = "0123456789abYdef"; - - assert_eq!( - HexToBytesIter::new(badpos1).unwrap().next().unwrap().unwrap_err(), - InvalidCharError { pos: 0, invalid: b'Z' } - ); - assert_eq!( - HexToBytesIter::new(badpos2).unwrap().nth(1).unwrap().unwrap_err(), - InvalidCharError { pos: 3, invalid: b'Y' } - ); - assert_eq!( - HexToBytesIter::new(badpos3).unwrap().next_back().unwrap().unwrap_err(), - InvalidCharError { pos: 15, invalid: b'Z' } - ); - assert_eq!( - HexToBytesIter::new(badpos4).unwrap().nth_back(1).unwrap().unwrap_err(), - InvalidCharError { pos: 12, invalid: b'Y' } - ); - } - - #[test] - fn hex_to_array() { - let len_sixteen = "0123456789abcdef"; - assert!(decode_to_array::<8>(len_sixteen).is_ok()); - } - - #[test] - fn hex_to_array_error() { - let len_sixteen = "0123456789abcdef"; - assert_eq!( - decode_to_array::<4>(len_sixteen).unwrap_err(), - InvalidLengthError { invalid: 16, expected: 8 }.into() - ); - } - - #[test] - #[cfg(feature = "alloc")] - fn mixed_case() { - use crate::display::DisplayHex as _; - - let s = "DEADbeef0123"; - let want_lower = "deadbeef0123"; - let want_upper = "DEADBEEF0123"; - - let v = decode_to_vec(s).expect("valid hex"); - assert_eq!(format!("{:x}", v.as_hex()), want_lower); - assert_eq!(format!("{:X}", v.as_hex()), want_upper); - } -} From 6a4ff6f7d5108a20d82cffb5068497a6a97f7cc0 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Fri, 27 Feb 2026 14:24:14 +1100 Subject: [PATCH 06/15] Just delete instead of deprecating test_hex_unwrap We want to delete the `FromHex` trait which this old macro uses. Just delete it and call it a day. (Note we provide a `hex` macro already that works in const contexts.) --- src/lib.rs | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 1f50264..7ac3ca4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -268,26 +268,9 @@ mod table { } } -/// Quick and dirty macro for parsing hex in tests. -/// -/// For improved ergonomics import with: `use hex_conservative::test_hex_unwrap as hex;` -#[macro_export] -#[deprecated(since = "TBD", note = "use the one-liner `Vec::from_hex(hex).unwrap()` instead")] -#[cfg(feature = "alloc")] -macro_rules! test_hex_unwrap (($hex:expr) => ( as $crate::FromHex>::from_hex($hex).unwrap())); - #[cfg(test)] #[cfg(feature = "alloc")] mod tests { - use alloc::vec::Vec; - - #[test] - fn parse_hex_into_vector() { - let got = crate::test_hex_unwrap!("deadbeef"); - let want = vec![0xde, 0xad, 0xbe, 0xef]; - assert_eq!(got, want); - } - #[test] fn hex_macro() { let data = hex!("deadbeef"); From 57ab5218718b926a7d8673ef439cad9cd82e783d Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Fri, 27 Feb 2026 14:28:21 +1100 Subject: [PATCH 07/15] Delete the serde module We would like to release this branch as `v1.1`. Currently the `serde` deserialize logic uses `FromHex` which we would also like to delete. Instead of trying to work out 1.0-able `serde` stuff lets just delete the module. We can put it back in later if anyone screams at us. --- Cargo.toml | 4 - contrib/test_vars.sh | 6 +- examples/serde.rs | 31 -------- src/lib.rs | 2 - src/serde.rs | 186 ------------------------------------------- tests/api.rs | 27 +------ 6 files changed, 5 insertions(+), 251 deletions(-) delete mode 100644 examples/serde.rs delete mode 100644 src/serde.rs diff --git a/Cargo.toml b/Cargo.toml index 80a5424..ebba805 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -45,10 +45,6 @@ name = "hexy" [[example]] name = "wrap_array" -[[example]] -name = "serde" -required-features = ["std", "serde"] - [lints.clippy] # Exclude lints we don't think are valuable. needless_question_mark = "allow" # https://github.com/rust-bitcoin/rust-bitcoin/pull/2134 diff --git a/contrib/test_vars.sh b/contrib/test_vars.sh index 72f332f..42783ff 100644 --- a/contrib/test_vars.sh +++ b/contrib/test_vars.sh @@ -5,10 +5,10 @@ # shellcheck disable=SC2034 # Test all these features with "std" enabled. -FEATURES_WITH_STD="serde newer-rust-version" +FEATURES_WITH_STD="newer-rust-version" # Test all these features without "std" or "alloc" enabled. -FEATURES_WITHOUT_STD="alloc serde newer-rust-version" +FEATURES_WITHOUT_STD="alloc newer-rust-version" # Run these examples. -EXAMPLES="hexy:std wrap_array:std serde:std,serde" +EXAMPLES="hexy:std wrap_array:std" diff --git a/examples/serde.rs b/examples/serde.rs deleted file mode 100644 index 3cef8b6..0000000 --- a/examples/serde.rs +++ /dev/null @@ -1,31 +0,0 @@ -// SPDX-License-Identifier: CC0-1.0 - -//! Demonstrate how to use the serde module with struct fields. - -#![allow(clippy::disallowed_names)] // Foo is a valid name. - -use hex_conservative as hex; -use serde::{Deserialize, Serialize}; - -/// Abstracts over foo. -#[derive(Debug, Serialize, Deserialize)] -pub struct Foo { - // serialized as a hexadecimal string. - #[serde(with = "hex::serde")] - pub u: Vec, - // serialized as an array of decimal integers. - pub v: Vec, -} - -fn main() { - let v = vec![0xde, 0xad, 0xbe, 0xef]; - - let foo = Foo { u: v.clone(), v }; - let ser = serde_json::to_string(&foo).expect("failed to serialize foo"); - - // Prints: - // - // foo: {"u":"deadbeef","v":[222,173,190,239]} - // - println!("\nfoo: {}", ser); -} diff --git a/src/lib.rs b/src/lib.rs index 7ac3ca4..b4fab63 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -102,8 +102,6 @@ pub mod display; pub mod error; mod iter; pub mod parse; -#[cfg(feature = "serde")] -pub mod serde; /// Re-exports of the common crate traits. pub mod prelude { diff --git a/src/serde.rs b/src/serde.rs deleted file mode 100644 index 1aa7bfb..0000000 --- a/src/serde.rs +++ /dev/null @@ -1,186 +0,0 @@ -//! Hex encoding with `serde`. -//! -//! The functions in this module de/serialize as hex _only_ when the serializer is human readable. -//! -//! # Examples -//! -//! ``` -//! # #[cfg(feature = "std")] { -//! use hex_conservative as hex; -//! use serde::{Serialize, Deserialize}; -//! -//! #[derive(Debug, Serialize, Deserialize)] -//! struct Foo { -//! #[serde(with = "hex::serde")] -//! bar: Vec, -//! } -//! # } -//! ``` - -use core::fmt; -use core::marker::PhantomData; - -use serde::de::{Error, Visitor}; -use serde::{Deserialize, Deserializer, Serialize, Serializer}; - -use crate::prelude::*; - -/// Serializes `data` as a hex string using lowercase characters. -/// -/// We only serialize as hex if the serializer is human readable, if not we call through to the -/// `Serialize` implementation for `data`. -/// -/// # Errors -/// -/// Returns the serializer error if one occurs. -pub fn serialize(data: T, s: S) -> Result -where - S: Serializer, - T: Serialize + DisplayHex, -{ - serialize_lower(data, s) -} - -/// Serializes `data` as a hex string using lowercase characters. -/// -/// We only serialize as hex if the serializer is human readable, if not we call through to the -/// `Serialize` implementation for `data`. -/// -/// # Errors -/// -/// Returns the serializer error if one occurs. -pub fn serialize_lower(data: T, serializer: S) -> Result -where - S: Serializer, - T: Serialize + DisplayHex, -{ - // Don't do anything special when not human readable. - if serializer.is_human_readable() { - serializer.collect_str(&format_args!("{:x}", data.as_hex())) - } else { - serde::Serialize::serialize(&data, serializer) - } -} - -/// Serializes `data` as hex string using uppercase characters. -/// -/// We only serialize as hex if the serializer is human readable, if not we call through to the -/// `Serialize` implementation for `data`. -/// -/// # Errors -/// -/// Returns the serializer error if one occurs. -pub fn serialize_upper(data: T, serializer: S) -> Result -where - S: Serializer, - T: Serialize + DisplayHex, -{ - // Don't do anything special when not human readable. - if serializer.is_human_readable() { - serializer.collect_str(&format_args!("{:X}", data.as_hex())) - } else { - serde::Serialize::serialize(&data, serializer) - } -} - -/// Byte slice wrapper to serialize as a hex string in lowercase characters. -#[derive(Debug)] -pub struct SerializeBytesAsHex<'a>(pub &'a [u8]); - -impl serde::Serialize for SerializeBytesAsHex<'_> { - fn serialize(&self, serializer: S) -> Result - where - S: serde::Serializer, - { - serialize_lower(self.0, serializer) - } -} - -/// Byte slice wrapper to serialize as a hex string in lowercase characters. -#[derive(Debug)] -pub struct SerializeBytesAsHexLower<'a>(pub &'a [u8]); - -impl serde::Serialize for SerializeBytesAsHexLower<'_> { - fn serialize(&self, serializer: S) -> Result - where - S: serde::Serializer, - { - serialize_lower(self.0, serializer) - } -} - -/// Byte slice wrapper to serialize as a hex string in uppercase characters. -#[derive(Debug)] -pub struct SerializeBytesAsHexUpper<'a>(pub &'a [u8]); - -impl serde::Serialize for SerializeBytesAsHexUpper<'_> { - fn serialize(&self, serializer: S) -> Result - where - S: serde::Serializer, - { - serialize_upper(self.0, serializer) - } -} - -/// Deserializes a hex string into raw bytes. -/// -/// Allows upper, lower, and mixed case characters (e.g. `a5b3c1`, `A5B3C1` and `A5b3C1`). -/// -/// We only deserialize from hex if the serializer is human readable, if not we call through to the -/// `Deserialize` implementation for `T`. -/// -/// # Errors -/// -/// Returns the deserializer error if one occurs. -pub fn deserialize<'de, D, T>(d: D) -> Result -where - D: Deserializer<'de>, - T: Deserialize<'de> + FromHex, -{ - struct HexVisitor(PhantomData); - - impl Visitor<'_> for HexVisitor - where - T: FromHex, - { - type Value = T; - - fn expecting(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("an ASCII hex string") - } - - fn visit_str(self, data: &str) -> Result { - FromHex::from_hex(data).map_err(Error::custom) - } - } - - // Don't do anything special when not human readable. - if d.is_human_readable() { - d.deserialize_str(HexVisitor(PhantomData)) - } else { - serde::Deserialize::deserialize(d) - } -} - -#[cfg(test)] -mod test { - #[test] - fn serialize_lower_roundtrip() -> Result<(), serde_json::Error> { - let bytes: [u8; 4] = [0xde, 0xad, 0xbe, 0xef]; - let serialized: serde_json::Value = - super::serialize_lower(&bytes, serde_json::value::Serializer)?; - let deserialized: [u8; 4] = super::deserialize(serialized)?; - assert_eq!(bytes, deserialized); - Ok(()) - } - - #[test] - fn serialize_upper_roundtrip() -> Result<(), serde_json::Error> { - let bytes: [u8; 4] = [0xde, 0xad, 0xbe, 0xef]; - let serialized: serde_json::Value = - super::serialize_upper(&bytes, serde_json::value::Serializer)?; - let deserialized: [u8; 4] = super::deserialize(serialized)?; - assert_eq!(bytes, deserialized); - Ok(()) - } -} diff --git a/tests/api.rs b/tests/api.rs index 8c758c1..008e5c5 100644 --- a/tests/api.rs +++ b/tests/api.rs @@ -13,8 +13,6 @@ use core::borrow::Borrow; use core::marker::PhantomData; use core::{fmt, slice}; -#[cfg(feature = "serde")] -use hex_conservative::serde; // These imports test "typical" usage by user code. use hex_conservative::{ buf_encoder, display, BytesToHexIter, Case, DecodeFixedLengthBytesError, @@ -52,13 +50,7 @@ where d: display::DisplayByteSlice<'a>, #[cfg(feature = "std")] e: display::HexWriter, - #[cfg(feature = "serde")] - f: serde::SerializeBytesAsHex<'a>, - #[cfg(feature = "serde")] - g: serde::SerializeBytesAsHexLower<'a>, - #[cfg(feature = "serde")] - h: serde::SerializeBytesAsHexUpper<'a>, - _i: PhantomData, // For when `std` is not enabled. + _marker: PhantomData, // For when `std` is not enabled. } impl Structs<'_, slice::Iter<'_, u8>, String> { @@ -72,13 +64,7 @@ impl Structs<'_, slice::Iter<'_, u8>, String> { d: BYTES[..].as_hex(), #[cfg(feature = "std")] e: display::HexWriter::new(String::new(), Case::Lower), - #[cfg(feature = "serde")] - f: serde::SerializeBytesAsHex(&BYTES), - #[cfg(feature = "serde")] - g: serde::SerializeBytesAsHexLower(&BYTES), - #[cfg(feature = "serde")] - h: serde::SerializeBytesAsHexUpper(&BYTES), - _i: PhantomData, + _marker: PhantomData, } } } @@ -113,15 +99,6 @@ fn api_all_non_error_types_have_non_empty_debug() { #[cfg(feature = "std")] let debug = format!("{:?}", t.e); assert!(!debug.is_empty()); - #[cfg(feature = "serde")] - { - let debug = format!("{:?}", t.f); - assert!(!debug.is_empty()); - let debug = format!("{:?}", t.g); - assert!(!debug.is_empty()); - let debug = format!("{:?}", t.h); - assert!(!debug.is_empty()); - } } #[test] From 77fe527e5a8394cd81a1def203c9c7f6bea3f4c6 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Fri, 27 Feb 2026 14:40:25 +1100 Subject: [PATCH 08/15] examples: Remove FromHex usage We can use the crate level decoding functions. --- examples/hexy.rs | 4 ++-- examples/wrap_array.rs | 6 +++--- src/error.rs | 9 +++------ 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/examples/hexy.rs b/examples/hexy.rs index a6ad1f5..c8fa414 100644 --- a/examples/hexy.rs +++ b/examples/hexy.rs @@ -9,7 +9,7 @@ use std::fmt; use std::str::FromStr; use hex_conservative::{ - fmt_hex_exact, Case, DecodeFixedLengthBytesError, DisplayHex as _, FromHex as _, + self as hex, fmt_hex_exact, Case, DecodeFixedLengthBytesError, DisplayHex as _, }; fn main() { @@ -52,7 +52,7 @@ impl FromStr for Hexy { fn from_str(s: &str) -> Result { // Errors if the input is invalid - let a = <[u8; 32]>::from_hex(s)?; + let a = hex::decode_to_array::<32>(s)?; Ok(Hexy { data: a }) } } diff --git a/examples/wrap_array.rs b/examples/wrap_array.rs index 3e02f52..72cdbf1 100644 --- a/examples/wrap_array.rs +++ b/examples/wrap_array.rs @@ -7,13 +7,13 @@ use core::fmt; use core::str::FromStr; -use hex_conservative::{DecodeFixedLengthBytesError, DisplayHex as _, FromHex as _}; +use hex_conservative::{self as hex, DecodeFixedLengthBytesError, DisplayHex as _}; fn main() { let hex = "deadbeefcafebabedeadbeefcafebabedeadbeefcafebabedeadbeefcafebabe"; println!("\nParse from hex: {}\n", hex); - let array = <[u8; 32]>::from_hex(hex).expect("failed to parse array"); + let array = hex::decode_to_array::<32>(hex).expect("failed to parse array"); let wrap = Wrap::from_str(hex).expect("failed to parse wrapped array from hex string"); println!("Print an array using traits from the standard libraries `fmt` module along with the provided implementation of `DisplayHex`:\n"); @@ -73,5 +73,5 @@ impl fmt::UpperHex for Wrap { impl FromStr for Wrap { type Err = DecodeFixedLengthBytesError; - fn from_str(s: &str) -> Result { Ok(Self(<[u8; 32]>::from_hex(s)?)) } + fn from_str(s: &str) -> Result { Ok(Self(hex::decode_to_array::<32>(s)?)) } } diff --git a/src/error.rs b/src/error.rs index b160540..1e3068c 100644 --- a/src/error.rs +++ b/src/error.rs @@ -410,10 +410,10 @@ if_std_error! {{ #[cfg(feature = "std")] mod tests { use super::*; - use crate::error::{InvalidCharError, OddLengthStringError}; - use crate::{decode_to_array, HexToBytesIter, InvalidLengthError}; #[cfg(feature = "alloc")] use crate::decode_to_vec; + use crate::error::{InvalidCharError, OddLengthStringError}; + use crate::{decode_to_array, HexToBytesIter, InvalidLengthError}; fn check_source(error: &T) { assert!(error.source().is_some()); @@ -489,10 +489,7 @@ mod tests { let badchar2 = "012Y456789abcdeb"; let badchar3 = "«23456789abcdef"; - assert_eq!( - decode_to_vec(oddlen).unwrap_err(), - OddLengthStringError { len: 17 }.into() - ); + assert_eq!(decode_to_vec(oddlen).unwrap_err(), OddLengthStringError { len: 17 }.into()); assert_eq!( decode_to_array::<4>(oddlen).unwrap_err(), InvalidLengthError { invalid: 17, expected: 8 }.into() From 35102fa7e9618312dd8f777ef20d5bda4c7513b4 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Fri, 27 Feb 2026 14:45:42 +1100 Subject: [PATCH 09/15] docs: Remove FromHex usage Remove the `FromHex` usage in crate level docs. --- src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index b4fab63..05811bd 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -22,9 +22,9 @@ //! use hex::prelude::*; //! //! // Decode an arbitrary length hex string into a vector. -//! let v = Vec::from_hex("deadbeef").expect("valid hex digits"); +//! let v = hex::decode_to_vec("deadbeef").expect("valid hex digits"); //! // Or a known length hex string into a fixed size array. -//! let a = <[u8; 4]>::from_hex("deadbeef").expect("valid length and valid hex digits"); +//! let a = hex::decode_to_array::<4>("deadbeef").expect("valid length and valid hex digits"); //! //! // We support `LowerHex` and `UpperHex` out of the box for `[u8]` slices. //! println!("An array as lower hex: {:x}", a.as_hex()); @@ -37,8 +37,8 @@ //! // Please note, mixed case strings will still parse successfully but we only //! // support displaying hex in a single case. //! assert_eq!( -//! Vec::from_hex("dEaDbEeF").expect("valid mixed case hex digits"), -//! Vec::from_hex("deadbeef").expect("valid hex digits"), +//! hex::decode_to_vec("dEaDbEeF").expect("valid mixed case hex digits"), +//! hex::decode_to_vec("deadbeef").expect("valid hex digits"), //! ); //! # } //! ``` From 3f370644a41a63715d120e65cf3eb89911d556de Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Fri, 27 Feb 2026 14:47:23 +1100 Subject: [PATCH 10/15] fuzz: Remove usage of FromHex As everywhere else replace `FromHex` with crate level decoding function. --- fuzz/fuzz_targets/hex.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fuzz/fuzz_targets/hex.rs b/fuzz/fuzz_targets/hex.rs index 8d78c58..81f2fad 100644 --- a/fuzz/fuzz_targets/hex.rs +++ b/fuzz/fuzz_targets/hex.rs @@ -1,11 +1,11 @@ -use hex::{DisplayHex, FromHex}; +use hex::DisplayHex; use honggfuzz::fuzz; const LEN: usize = 32; // Arbitrary amount of data. fn do_test(data: &[u8]) { if let Ok(s) = std::str::from_utf8(data) { - if let Ok(hexy) = <[u8; LEN]>::from_hex(s) { + if let Ok(hexy) = hex::decode_to_array::(s) { let got = format!("{:x}", hexy.as_hex()); assert_eq!(got, s.to_lowercase()); } From 5790b394f69013cd681e41b6836c384e367b13a5 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Fri, 27 Feb 2026 14:04:01 +1100 Subject: [PATCH 11/15] Delete the parse module The only thing being deleted is the `FromHex` trait. From 1.0 onwards we provide crate level decoding functions instead of this trait. --- src/lib.rs | 4 +--- src/parse.rs | 48 ------------------------------------------------ 2 files changed, 1 insertion(+), 51 deletions(-) delete mode 100644 src/parse.rs diff --git a/src/lib.rs b/src/lib.rs index 05811bd..86d0351 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -101,12 +101,11 @@ pub mod buf_encoder; pub mod display; pub mod error; mod iter; -pub mod parse; /// Re-exports of the common crate traits. pub mod prelude { #[doc(inline)] - pub use crate::{display::DisplayHex, parse::FromHex}; + pub use crate::display::DisplayHex; } #[cfg(feature = "alloc")] @@ -123,7 +122,6 @@ pub use self::{ OddLengthStringError, }, iter::{BytesToHexIter, HexToBytesIter, HexSliceToBytesIter}, - parse::FromHex, }; /// Decodes a hex string with variable length. diff --git a/src/parse.rs b/src/parse.rs deleted file mode 100644 index 57ae0d3..0000000 --- a/src/parse.rs +++ /dev/null @@ -1,48 +0,0 @@ -// SPDX-License-Identifier: CC0-1.0 - -//! Hex encoding and decoding. - -use core::{fmt, str}; - -#[cfg(feature = "alloc")] -use crate::alloc::vec::Vec; - -#[rustfmt::skip] // Keep public re-exports separate. -pub use crate::error::{DecodeVariableLengthBytesError, DecodeFixedLengthBytesError}; - -/// Trait for objects that can be deserialized from hex strings. -pub trait FromHex: Sized + sealed::Sealed { - /// Error type returned while parsing hex string. - type Error: Sized + fmt::Debug + fmt::Display; - - /// Produces an object from a hex string. - /// - /// # Errors - /// - /// Errors if parsing of hex string fails for any reason. - fn from_hex(s: &str) -> Result; -} - -#[cfg(feature = "alloc")] -impl FromHex for Vec { - type Error = DecodeVariableLengthBytesError; - - #[inline] - fn from_hex(s: &str) -> Result { crate::decode_to_vec(s) } -} - -impl FromHex for [u8; LEN] { - type Error = DecodeFixedLengthBytesError; - - fn from_hex(s: &str) -> Result { crate::decode_to_array(s) } -} - -mod sealed { - /// Used to seal the `FromHex` trait. - pub trait Sealed {} - - #[cfg(feature = "alloc")] - impl Sealed for alloc::vec::Vec {} - - impl Sealed for [u8; LEN] {} -} From 9e9e14804917fa4bebb640f37e6ddecf00c14f88 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Fri, 27 Feb 2026 14:21:05 +1100 Subject: [PATCH 12/15] Add v1.0 API text files Add a script to check for API changes. On the `1.x` branch run the script then copy the output files here. The ideas is that we can then run the script again and check we didn't inadvertently introduce any breaking changes so we can release `master` as `v1.1`. --- api/all-features.txt | 131 +++++++++++++++++++++++++++++++ api/alloc-only.txt | 124 +++++++++++++++++++++++++++++ api/no-features.txt | 123 +++++++++++++++++++++++++++++ contrib/check-for-api-changes.sh | 87 ++++++++++++++++++++ 4 files changed, 465 insertions(+) create mode 100644 api/all-features.txt create mode 100644 api/alloc-only.txt create mode 100644 api/no-features.txt create mode 100755 contrib/check-for-api-changes.sh diff --git a/api/all-features.txt b/api/all-features.txt new file mode 100644 index 0000000..c499473 --- /dev/null +++ b/api/all-features.txt @@ -0,0 +1,131 @@ +impl core::clone::Clone for hex_conservative::error::DecodeFixedLengthBytesError +impl core::clone::Clone for hex_conservative::error::DecodeVariableLengthBytesError +impl core::clone::Clone for hex_conservative::error::InvalidCharError +impl core::clone::Clone for hex_conservative::error::InvalidLengthError +impl core::clone::Clone for hex_conservative::error::OddLengthStringError +impl core::cmp::Eq for hex_conservative::error::DecodeFixedLengthBytesError +impl core::cmp::Eq for hex_conservative::error::DecodeVariableLengthBytesError +impl core::cmp::Eq for hex_conservative::error::InvalidCharError +impl core::cmp::Eq for hex_conservative::error::InvalidLengthError +impl core::cmp::Eq for hex_conservative::error::OddLengthStringError +impl core::cmp::PartialEq for hex_conservative::error::DecodeFixedLengthBytesError +impl core::cmp::PartialEq for hex_conservative::error::DecodeVariableLengthBytesError +impl core::cmp::PartialEq for hex_conservative::error::InvalidCharError +impl core::cmp::PartialEq for hex_conservative::error::InvalidLengthError +impl core::cmp::PartialEq for hex_conservative::error::OddLengthStringError +impl core::convert::From for hex_conservative::error::DecodeFixedLengthBytesError +impl core::convert::From for hex_conservative::error::DecodeVariableLengthBytesError +impl core::convert::From for hex_conservative::error::InvalidCharError +impl core::convert::From for hex_conservative::error::InvalidLengthError +impl core::convert::From for hex_conservative::error::OddLengthStringError +impl core::convert::From for hex_conservative::error::DecodeFixedLengthBytesError +impl core::convert::From for hex_conservative::error::DecodeVariableLengthBytesError +impl core::convert::From for hex_conservative::error::DecodeFixedLengthBytesError +impl core::convert::From for hex_conservative::error::DecodeVariableLengthBytesError +impl core::error::Error for hex_conservative::error::DecodeFixedLengthBytesError +impl core::error::Error for hex_conservative::error::DecodeVariableLengthBytesError +impl core::error::Error for hex_conservative::error::InvalidCharError +impl core::error::Error for hex_conservative::error::InvalidLengthError +impl core::error::Error for hex_conservative::error::OddLengthStringError +impl core::fmt::Debug for hex_conservative::error::DecodeFixedLengthBytesError +impl core::fmt::Debug for hex_conservative::error::DecodeVariableLengthBytesError +impl core::fmt::Debug for hex_conservative::error::InvalidCharError +impl core::fmt::Debug for hex_conservative::error::InvalidLengthError +impl core::fmt::Debug for hex_conservative::error::OddLengthStringError +impl core::fmt::Display for hex_conservative::error::DecodeFixedLengthBytesError +impl core::fmt::Display for hex_conservative::error::DecodeVariableLengthBytesError +impl core::fmt::Display for hex_conservative::error::InvalidCharError +impl core::fmt::Display for hex_conservative::error::InvalidLengthError +impl core::fmt::Display for hex_conservative::error::OddLengthStringError +impl core::marker::Freeze for hex_conservative::error::DecodeFixedLengthBytesError +impl core::marker::Freeze for hex_conservative::error::DecodeVariableLengthBytesError +impl core::marker::Freeze for hex_conservative::error::InvalidCharError +impl core::marker::Freeze for hex_conservative::error::InvalidLengthError +impl core::marker::Freeze for hex_conservative::error::OddLengthStringError +impl core::marker::Send for hex_conservative::error::DecodeFixedLengthBytesError +impl core::marker::Send for hex_conservative::error::DecodeVariableLengthBytesError +impl core::marker::Send for hex_conservative::error::InvalidCharError +impl core::marker::Send for hex_conservative::error::InvalidLengthError +impl core::marker::Send for hex_conservative::error::OddLengthStringError +impl core::marker::StructuralPartialEq for hex_conservative::error::DecodeFixedLengthBytesError +impl core::marker::StructuralPartialEq for hex_conservative::error::DecodeVariableLengthBytesError +impl core::marker::StructuralPartialEq for hex_conservative::error::InvalidCharError +impl core::marker::StructuralPartialEq for hex_conservative::error::InvalidLengthError +impl core::marker::StructuralPartialEq for hex_conservative::error::OddLengthStringError +impl core::marker::Sync for hex_conservative::error::DecodeFixedLengthBytesError +impl core::marker::Sync for hex_conservative::error::DecodeVariableLengthBytesError +impl core::marker::Sync for hex_conservative::error::InvalidCharError +impl core::marker::Sync for hex_conservative::error::InvalidLengthError +impl core::marker::Sync for hex_conservative::error::OddLengthStringError +impl core::marker::Unpin for hex_conservative::error::DecodeFixedLengthBytesError +impl core::marker::Unpin for hex_conservative::error::DecodeVariableLengthBytesError +impl core::marker::Unpin for hex_conservative::error::InvalidCharError +impl core::marker::Unpin for hex_conservative::error::InvalidLengthError +impl core::marker::Unpin for hex_conservative::error::OddLengthStringError +impl core::panic::unwind_safe::RefUnwindSafe for hex_conservative::error::DecodeFixedLengthBytesError +impl core::panic::unwind_safe::RefUnwindSafe for hex_conservative::error::DecodeVariableLengthBytesError +impl core::panic::unwind_safe::RefUnwindSafe for hex_conservative::error::InvalidCharError +impl core::panic::unwind_safe::RefUnwindSafe for hex_conservative::error::InvalidLengthError +impl core::panic::unwind_safe::RefUnwindSafe for hex_conservative::error::OddLengthStringError +impl core::panic::unwind_safe::UnwindSafe for hex_conservative::error::DecodeFixedLengthBytesError +impl core::panic::unwind_safe::UnwindSafe for hex_conservative::error::DecodeVariableLengthBytesError +impl core::panic::unwind_safe::UnwindSafe for hex_conservative::error::InvalidCharError +impl core::panic::unwind_safe::UnwindSafe for hex_conservative::error::InvalidLengthError +impl core::panic::unwind_safe::UnwindSafe for hex_conservative::error::OddLengthStringError +impl hex_conservative::error::DecodeFixedLengthBytesError +impl hex_conservative::error::DecodeVariableLengthBytesError +impl hex_conservative::error::InvalidCharError +impl hex_conservative::error::InvalidLengthError +impl hex_conservative::error::OddLengthStringError +pub enum hex_conservative::DecodeFixedLengthBytesError +pub enum hex_conservative::DecodeVariableLengthBytesError +pub enum hex_conservative::error::DecodeFixedLengthBytesError +pub enum hex_conservative::error::DecodeVariableLengthBytesError +pub fn hex_conservative::decode_to_array(hex: &str) -> core::result::Result<[u8; N], hex_conservative::error::DecodeFixedLengthBytesError> +pub fn hex_conservative::decode_to_vec(hex: &str) -> core::result::Result, hex_conservative::error::DecodeVariableLengthBytesError> +pub fn hex_conservative::error::DecodeFixedLengthBytesError::clone(&self) -> hex_conservative::error::DecodeFixedLengthBytesError +pub fn hex_conservative::error::DecodeFixedLengthBytesError::eq(&self, other: &hex_conservative::error::DecodeFixedLengthBytesError) -> bool +pub fn hex_conservative::error::DecodeFixedLengthBytesError::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn hex_conservative::error::DecodeFixedLengthBytesError::from(e: hex_conservative::error::InvalidCharError) -> Self +pub fn hex_conservative::error::DecodeFixedLengthBytesError::from(e: hex_conservative::error::InvalidLengthError) -> Self +pub fn hex_conservative::error::DecodeFixedLengthBytesError::from(never: core::convert::Infallible) -> Self +pub fn hex_conservative::error::DecodeFixedLengthBytesError::offset(self, by_bytes: usize) -> Self +pub fn hex_conservative::error::DecodeFixedLengthBytesError::source(&self) -> core::option::Option<&(dyn core::error::Error + 'static)> +pub fn hex_conservative::error::DecodeVariableLengthBytesError::clone(&self) -> hex_conservative::error::DecodeVariableLengthBytesError +pub fn hex_conservative::error::DecodeVariableLengthBytesError::eq(&self, other: &hex_conservative::error::DecodeVariableLengthBytesError) -> bool +pub fn hex_conservative::error::DecodeVariableLengthBytesError::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn hex_conservative::error::DecodeVariableLengthBytesError::from(e: hex_conservative::error::InvalidCharError) -> Self +pub fn hex_conservative::error::DecodeVariableLengthBytesError::from(e: hex_conservative::error::OddLengthStringError) -> Self +pub fn hex_conservative::error::DecodeVariableLengthBytesError::from(never: core::convert::Infallible) -> Self +pub fn hex_conservative::error::DecodeVariableLengthBytesError::offset(self, by_bytes: usize) -> Self +pub fn hex_conservative::error::DecodeVariableLengthBytesError::source(&self) -> core::option::Option<&(dyn core::error::Error + 'static)> +pub fn hex_conservative::error::InvalidCharError::clone(&self) -> hex_conservative::error::InvalidCharError +pub fn hex_conservative::error::InvalidCharError::eq(&self, other: &hex_conservative::error::InvalidCharError) -> bool +pub fn hex_conservative::error::InvalidCharError::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn hex_conservative::error::InvalidCharError::from(never: core::convert::Infallible) -> Self +pub fn hex_conservative::error::InvalidCharError::offset(self, by_bytes: usize) -> Self +pub fn hex_conservative::error::InvalidCharError::pos(&self) -> usize +pub fn hex_conservative::error::InvalidLengthError::clone(&self) -> hex_conservative::error::InvalidLengthError +pub fn hex_conservative::error::InvalidLengthError::eq(&self, other: &hex_conservative::error::InvalidLengthError) -> bool +pub fn hex_conservative::error::InvalidLengthError::expected_length(&self) -> usize +pub fn hex_conservative::error::InvalidLengthError::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn hex_conservative::error::InvalidLengthError::from(never: core::convert::Infallible) -> Self +pub fn hex_conservative::error::InvalidLengthError::invalid_length(&self) -> usize +pub fn hex_conservative::error::OddLengthStringError::clone(&self) -> hex_conservative::error::OddLengthStringError +pub fn hex_conservative::error::OddLengthStringError::eq(&self, other: &hex_conservative::error::OddLengthStringError) -> bool +pub fn hex_conservative::error::OddLengthStringError::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn hex_conservative::error::OddLengthStringError::from(never: core::convert::Infallible) -> Self +pub fn hex_conservative::error::OddLengthStringError::length(&self) -> usize +pub hex_conservative::DecodeFixedLengthBytesError::InvalidChar(hex_conservative::error::InvalidCharError) +pub hex_conservative::DecodeFixedLengthBytesError::InvalidLength(hex_conservative::error::InvalidLengthError) +pub hex_conservative::DecodeVariableLengthBytesError::InvalidChar(hex_conservative::error::InvalidCharError) +pub hex_conservative::DecodeVariableLengthBytesError::OddLengthString(hex_conservative::error::OddLengthStringError) +pub hex_conservative::error::DecodeFixedLengthBytesError::InvalidChar(hex_conservative::error::InvalidCharError) +pub hex_conservative::error::DecodeFixedLengthBytesError::InvalidLength(hex_conservative::error::InvalidLengthError) +pub hex_conservative::error::DecodeVariableLengthBytesError::InvalidChar(hex_conservative::error::InvalidCharError) +pub hex_conservative::error::DecodeVariableLengthBytesError::OddLengthString(hex_conservative::error::OddLengthStringError) +pub mod hex_conservative +pub mod hex_conservative::error +pub struct hex_conservative::error::InvalidCharError +pub struct hex_conservative::error::InvalidLengthError +pub struct hex_conservative::error::OddLengthStringError diff --git a/api/alloc-only.txt b/api/alloc-only.txt new file mode 100644 index 0000000..706caae --- /dev/null +++ b/api/alloc-only.txt @@ -0,0 +1,124 @@ +impl core::clone::Clone for hex_conservative::error::DecodeFixedLengthBytesError +impl core::clone::Clone for hex_conservative::error::DecodeVariableLengthBytesError +impl core::clone::Clone for hex_conservative::error::InvalidCharError +impl core::clone::Clone for hex_conservative::error::InvalidLengthError +impl core::clone::Clone for hex_conservative::error::OddLengthStringError +impl core::cmp::Eq for hex_conservative::error::DecodeFixedLengthBytesError +impl core::cmp::Eq for hex_conservative::error::DecodeVariableLengthBytesError +impl core::cmp::Eq for hex_conservative::error::InvalidCharError +impl core::cmp::Eq for hex_conservative::error::InvalidLengthError +impl core::cmp::Eq for hex_conservative::error::OddLengthStringError +impl core::cmp::PartialEq for hex_conservative::error::DecodeFixedLengthBytesError +impl core::cmp::PartialEq for hex_conservative::error::DecodeVariableLengthBytesError +impl core::cmp::PartialEq for hex_conservative::error::InvalidCharError +impl core::cmp::PartialEq for hex_conservative::error::InvalidLengthError +impl core::cmp::PartialEq for hex_conservative::error::OddLengthStringError +impl core::convert::From for hex_conservative::error::DecodeFixedLengthBytesError +impl core::convert::From for hex_conservative::error::DecodeVariableLengthBytesError +impl core::convert::From for hex_conservative::error::InvalidCharError +impl core::convert::From for hex_conservative::error::InvalidLengthError +impl core::convert::From for hex_conservative::error::OddLengthStringError +impl core::convert::From for hex_conservative::error::DecodeFixedLengthBytesError +impl core::convert::From for hex_conservative::error::DecodeVariableLengthBytesError +impl core::convert::From for hex_conservative::error::DecodeFixedLengthBytesError +impl core::convert::From for hex_conservative::error::DecodeVariableLengthBytesError +impl core::fmt::Debug for hex_conservative::error::DecodeFixedLengthBytesError +impl core::fmt::Debug for hex_conservative::error::DecodeVariableLengthBytesError +impl core::fmt::Debug for hex_conservative::error::InvalidCharError +impl core::fmt::Debug for hex_conservative::error::InvalidLengthError +impl core::fmt::Debug for hex_conservative::error::OddLengthStringError +impl core::fmt::Display for hex_conservative::error::DecodeFixedLengthBytesError +impl core::fmt::Display for hex_conservative::error::DecodeVariableLengthBytesError +impl core::fmt::Display for hex_conservative::error::InvalidCharError +impl core::fmt::Display for hex_conservative::error::InvalidLengthError +impl core::fmt::Display for hex_conservative::error::OddLengthStringError +impl core::marker::Freeze for hex_conservative::error::DecodeFixedLengthBytesError +impl core::marker::Freeze for hex_conservative::error::DecodeVariableLengthBytesError +impl core::marker::Freeze for hex_conservative::error::InvalidCharError +impl core::marker::Freeze for hex_conservative::error::InvalidLengthError +impl core::marker::Freeze for hex_conservative::error::OddLengthStringError +impl core::marker::Send for hex_conservative::error::DecodeFixedLengthBytesError +impl core::marker::Send for hex_conservative::error::DecodeVariableLengthBytesError +impl core::marker::Send for hex_conservative::error::InvalidCharError +impl core::marker::Send for hex_conservative::error::InvalidLengthError +impl core::marker::Send for hex_conservative::error::OddLengthStringError +impl core::marker::StructuralPartialEq for hex_conservative::error::DecodeFixedLengthBytesError +impl core::marker::StructuralPartialEq for hex_conservative::error::DecodeVariableLengthBytesError +impl core::marker::StructuralPartialEq for hex_conservative::error::InvalidCharError +impl core::marker::StructuralPartialEq for hex_conservative::error::InvalidLengthError +impl core::marker::StructuralPartialEq for hex_conservative::error::OddLengthStringError +impl core::marker::Sync for hex_conservative::error::DecodeFixedLengthBytesError +impl core::marker::Sync for hex_conservative::error::DecodeVariableLengthBytesError +impl core::marker::Sync for hex_conservative::error::InvalidCharError +impl core::marker::Sync for hex_conservative::error::InvalidLengthError +impl core::marker::Sync for hex_conservative::error::OddLengthStringError +impl core::marker::Unpin for hex_conservative::error::DecodeFixedLengthBytesError +impl core::marker::Unpin for hex_conservative::error::DecodeVariableLengthBytesError +impl core::marker::Unpin for hex_conservative::error::InvalidCharError +impl core::marker::Unpin for hex_conservative::error::InvalidLengthError +impl core::marker::Unpin for hex_conservative::error::OddLengthStringError +impl core::panic::unwind_safe::RefUnwindSafe for hex_conservative::error::DecodeFixedLengthBytesError +impl core::panic::unwind_safe::RefUnwindSafe for hex_conservative::error::DecodeVariableLengthBytesError +impl core::panic::unwind_safe::RefUnwindSafe for hex_conservative::error::InvalidCharError +impl core::panic::unwind_safe::RefUnwindSafe for hex_conservative::error::InvalidLengthError +impl core::panic::unwind_safe::RefUnwindSafe for hex_conservative::error::OddLengthStringError +impl core::panic::unwind_safe::UnwindSafe for hex_conservative::error::DecodeFixedLengthBytesError +impl core::panic::unwind_safe::UnwindSafe for hex_conservative::error::DecodeVariableLengthBytesError +impl core::panic::unwind_safe::UnwindSafe for hex_conservative::error::InvalidCharError +impl core::panic::unwind_safe::UnwindSafe for hex_conservative::error::InvalidLengthError +impl core::panic::unwind_safe::UnwindSafe for hex_conservative::error::OddLengthStringError +impl hex_conservative::error::DecodeFixedLengthBytesError +impl hex_conservative::error::DecodeVariableLengthBytesError +impl hex_conservative::error::InvalidCharError +impl hex_conservative::error::InvalidLengthError +impl hex_conservative::error::OddLengthStringError +pub enum hex_conservative::DecodeFixedLengthBytesError +pub enum hex_conservative::DecodeVariableLengthBytesError +pub enum hex_conservative::error::DecodeFixedLengthBytesError +pub enum hex_conservative::error::DecodeVariableLengthBytesError +pub fn hex_conservative::decode_to_array(hex: &str) -> core::result::Result<[u8; N], hex_conservative::error::DecodeFixedLengthBytesError> +pub fn hex_conservative::decode_to_vec(hex: &str) -> core::result::Result, hex_conservative::error::DecodeVariableLengthBytesError> +pub fn hex_conservative::error::DecodeFixedLengthBytesError::clone(&self) -> hex_conservative::error::DecodeFixedLengthBytesError +pub fn hex_conservative::error::DecodeFixedLengthBytesError::eq(&self, other: &hex_conservative::error::DecodeFixedLengthBytesError) -> bool +pub fn hex_conservative::error::DecodeFixedLengthBytesError::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn hex_conservative::error::DecodeFixedLengthBytesError::from(e: hex_conservative::error::InvalidCharError) -> Self +pub fn hex_conservative::error::DecodeFixedLengthBytesError::from(e: hex_conservative::error::InvalidLengthError) -> Self +pub fn hex_conservative::error::DecodeFixedLengthBytesError::from(never: core::convert::Infallible) -> Self +pub fn hex_conservative::error::DecodeFixedLengthBytesError::offset(self, by_bytes: usize) -> Self +pub fn hex_conservative::error::DecodeVariableLengthBytesError::clone(&self) -> hex_conservative::error::DecodeVariableLengthBytesError +pub fn hex_conservative::error::DecodeVariableLengthBytesError::eq(&self, other: &hex_conservative::error::DecodeVariableLengthBytesError) -> bool +pub fn hex_conservative::error::DecodeVariableLengthBytesError::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn hex_conservative::error::DecodeVariableLengthBytesError::from(e: hex_conservative::error::InvalidCharError) -> Self +pub fn hex_conservative::error::DecodeVariableLengthBytesError::from(e: hex_conservative::error::OddLengthStringError) -> Self +pub fn hex_conservative::error::DecodeVariableLengthBytesError::from(never: core::convert::Infallible) -> Self +pub fn hex_conservative::error::DecodeVariableLengthBytesError::offset(self, by_bytes: usize) -> Self +pub fn hex_conservative::error::InvalidCharError::clone(&self) -> hex_conservative::error::InvalidCharError +pub fn hex_conservative::error::InvalidCharError::eq(&self, other: &hex_conservative::error::InvalidCharError) -> bool +pub fn hex_conservative::error::InvalidCharError::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn hex_conservative::error::InvalidCharError::from(never: core::convert::Infallible) -> Self +pub fn hex_conservative::error::InvalidCharError::offset(self, by_bytes: usize) -> Self +pub fn hex_conservative::error::InvalidCharError::pos(&self) -> usize +pub fn hex_conservative::error::InvalidLengthError::clone(&self) -> hex_conservative::error::InvalidLengthError +pub fn hex_conservative::error::InvalidLengthError::eq(&self, other: &hex_conservative::error::InvalidLengthError) -> bool +pub fn hex_conservative::error::InvalidLengthError::expected_length(&self) -> usize +pub fn hex_conservative::error::InvalidLengthError::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn hex_conservative::error::InvalidLengthError::from(never: core::convert::Infallible) -> Self +pub fn hex_conservative::error::InvalidLengthError::invalid_length(&self) -> usize +pub fn hex_conservative::error::OddLengthStringError::clone(&self) -> hex_conservative::error::OddLengthStringError +pub fn hex_conservative::error::OddLengthStringError::eq(&self, other: &hex_conservative::error::OddLengthStringError) -> bool +pub fn hex_conservative::error::OddLengthStringError::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn hex_conservative::error::OddLengthStringError::from(never: core::convert::Infallible) -> Self +pub fn hex_conservative::error::OddLengthStringError::length(&self) -> usize +pub hex_conservative::DecodeFixedLengthBytesError::InvalidChar(hex_conservative::error::InvalidCharError) +pub hex_conservative::DecodeFixedLengthBytesError::InvalidLength(hex_conservative::error::InvalidLengthError) +pub hex_conservative::DecodeVariableLengthBytesError::InvalidChar(hex_conservative::error::InvalidCharError) +pub hex_conservative::DecodeVariableLengthBytesError::OddLengthString(hex_conservative::error::OddLengthStringError) +pub hex_conservative::error::DecodeFixedLengthBytesError::InvalidChar(hex_conservative::error::InvalidCharError) +pub hex_conservative::error::DecodeFixedLengthBytesError::InvalidLength(hex_conservative::error::InvalidLengthError) +pub hex_conservative::error::DecodeVariableLengthBytesError::InvalidChar(hex_conservative::error::InvalidCharError) +pub hex_conservative::error::DecodeVariableLengthBytesError::OddLengthString(hex_conservative::error::OddLengthStringError) +pub mod hex_conservative +pub mod hex_conservative::error +pub struct hex_conservative::error::InvalidCharError +pub struct hex_conservative::error::InvalidLengthError +pub struct hex_conservative::error::OddLengthStringError diff --git a/api/no-features.txt b/api/no-features.txt new file mode 100644 index 0000000..4c56557 --- /dev/null +++ b/api/no-features.txt @@ -0,0 +1,123 @@ +impl core::clone::Clone for hex_conservative::error::DecodeFixedLengthBytesError +impl core::clone::Clone for hex_conservative::error::DecodeVariableLengthBytesError +impl core::clone::Clone for hex_conservative::error::InvalidCharError +impl core::clone::Clone for hex_conservative::error::InvalidLengthError +impl core::clone::Clone for hex_conservative::error::OddLengthStringError +impl core::cmp::Eq for hex_conservative::error::DecodeFixedLengthBytesError +impl core::cmp::Eq for hex_conservative::error::DecodeVariableLengthBytesError +impl core::cmp::Eq for hex_conservative::error::InvalidCharError +impl core::cmp::Eq for hex_conservative::error::InvalidLengthError +impl core::cmp::Eq for hex_conservative::error::OddLengthStringError +impl core::cmp::PartialEq for hex_conservative::error::DecodeFixedLengthBytesError +impl core::cmp::PartialEq for hex_conservative::error::DecodeVariableLengthBytesError +impl core::cmp::PartialEq for hex_conservative::error::InvalidCharError +impl core::cmp::PartialEq for hex_conservative::error::InvalidLengthError +impl core::cmp::PartialEq for hex_conservative::error::OddLengthStringError +impl core::convert::From for hex_conservative::error::DecodeFixedLengthBytesError +impl core::convert::From for hex_conservative::error::DecodeVariableLengthBytesError +impl core::convert::From for hex_conservative::error::InvalidCharError +impl core::convert::From for hex_conservative::error::InvalidLengthError +impl core::convert::From for hex_conservative::error::OddLengthStringError +impl core::convert::From for hex_conservative::error::DecodeFixedLengthBytesError +impl core::convert::From for hex_conservative::error::DecodeVariableLengthBytesError +impl core::convert::From for hex_conservative::error::DecodeFixedLengthBytesError +impl core::convert::From for hex_conservative::error::DecodeVariableLengthBytesError +impl core::fmt::Debug for hex_conservative::error::DecodeFixedLengthBytesError +impl core::fmt::Debug for hex_conservative::error::DecodeVariableLengthBytesError +impl core::fmt::Debug for hex_conservative::error::InvalidCharError +impl core::fmt::Debug for hex_conservative::error::InvalidLengthError +impl core::fmt::Debug for hex_conservative::error::OddLengthStringError +impl core::fmt::Display for hex_conservative::error::DecodeFixedLengthBytesError +impl core::fmt::Display for hex_conservative::error::DecodeVariableLengthBytesError +impl core::fmt::Display for hex_conservative::error::InvalidCharError +impl core::fmt::Display for hex_conservative::error::InvalidLengthError +impl core::fmt::Display for hex_conservative::error::OddLengthStringError +impl core::marker::Freeze for hex_conservative::error::DecodeFixedLengthBytesError +impl core::marker::Freeze for hex_conservative::error::DecodeVariableLengthBytesError +impl core::marker::Freeze for hex_conservative::error::InvalidCharError +impl core::marker::Freeze for hex_conservative::error::InvalidLengthError +impl core::marker::Freeze for hex_conservative::error::OddLengthStringError +impl core::marker::Send for hex_conservative::error::DecodeFixedLengthBytesError +impl core::marker::Send for hex_conservative::error::DecodeVariableLengthBytesError +impl core::marker::Send for hex_conservative::error::InvalidCharError +impl core::marker::Send for hex_conservative::error::InvalidLengthError +impl core::marker::Send for hex_conservative::error::OddLengthStringError +impl core::marker::StructuralPartialEq for hex_conservative::error::DecodeFixedLengthBytesError +impl core::marker::StructuralPartialEq for hex_conservative::error::DecodeVariableLengthBytesError +impl core::marker::StructuralPartialEq for hex_conservative::error::InvalidCharError +impl core::marker::StructuralPartialEq for hex_conservative::error::InvalidLengthError +impl core::marker::StructuralPartialEq for hex_conservative::error::OddLengthStringError +impl core::marker::Sync for hex_conservative::error::DecodeFixedLengthBytesError +impl core::marker::Sync for hex_conservative::error::DecodeVariableLengthBytesError +impl core::marker::Sync for hex_conservative::error::InvalidCharError +impl core::marker::Sync for hex_conservative::error::InvalidLengthError +impl core::marker::Sync for hex_conservative::error::OddLengthStringError +impl core::marker::Unpin for hex_conservative::error::DecodeFixedLengthBytesError +impl core::marker::Unpin for hex_conservative::error::DecodeVariableLengthBytesError +impl core::marker::Unpin for hex_conservative::error::InvalidCharError +impl core::marker::Unpin for hex_conservative::error::InvalidLengthError +impl core::marker::Unpin for hex_conservative::error::OddLengthStringError +impl core::panic::unwind_safe::RefUnwindSafe for hex_conservative::error::DecodeFixedLengthBytesError +impl core::panic::unwind_safe::RefUnwindSafe for hex_conservative::error::DecodeVariableLengthBytesError +impl core::panic::unwind_safe::RefUnwindSafe for hex_conservative::error::InvalidCharError +impl core::panic::unwind_safe::RefUnwindSafe for hex_conservative::error::InvalidLengthError +impl core::panic::unwind_safe::RefUnwindSafe for hex_conservative::error::OddLengthStringError +impl core::panic::unwind_safe::UnwindSafe for hex_conservative::error::DecodeFixedLengthBytesError +impl core::panic::unwind_safe::UnwindSafe for hex_conservative::error::DecodeVariableLengthBytesError +impl core::panic::unwind_safe::UnwindSafe for hex_conservative::error::InvalidCharError +impl core::panic::unwind_safe::UnwindSafe for hex_conservative::error::InvalidLengthError +impl core::panic::unwind_safe::UnwindSafe for hex_conservative::error::OddLengthStringError +impl hex_conservative::error::DecodeFixedLengthBytesError +impl hex_conservative::error::DecodeVariableLengthBytesError +impl hex_conservative::error::InvalidCharError +impl hex_conservative::error::InvalidLengthError +impl hex_conservative::error::OddLengthStringError +pub enum hex_conservative::DecodeFixedLengthBytesError +pub enum hex_conservative::DecodeVariableLengthBytesError +pub enum hex_conservative::error::DecodeFixedLengthBytesError +pub enum hex_conservative::error::DecodeVariableLengthBytesError +pub fn hex_conservative::decode_to_array(hex: &str) -> core::result::Result<[u8; N], hex_conservative::error::DecodeFixedLengthBytesError> +pub fn hex_conservative::error::DecodeFixedLengthBytesError::clone(&self) -> hex_conservative::error::DecodeFixedLengthBytesError +pub fn hex_conservative::error::DecodeFixedLengthBytesError::eq(&self, other: &hex_conservative::error::DecodeFixedLengthBytesError) -> bool +pub fn hex_conservative::error::DecodeFixedLengthBytesError::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn hex_conservative::error::DecodeFixedLengthBytesError::from(e: hex_conservative::error::InvalidCharError) -> Self +pub fn hex_conservative::error::DecodeFixedLengthBytesError::from(e: hex_conservative::error::InvalidLengthError) -> Self +pub fn hex_conservative::error::DecodeFixedLengthBytesError::from(never: core::convert::Infallible) -> Self +pub fn hex_conservative::error::DecodeFixedLengthBytesError::offset(self, by_bytes: usize) -> Self +pub fn hex_conservative::error::DecodeVariableLengthBytesError::clone(&self) -> hex_conservative::error::DecodeVariableLengthBytesError +pub fn hex_conservative::error::DecodeVariableLengthBytesError::eq(&self, other: &hex_conservative::error::DecodeVariableLengthBytesError) -> bool +pub fn hex_conservative::error::DecodeVariableLengthBytesError::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn hex_conservative::error::DecodeVariableLengthBytesError::from(e: hex_conservative::error::InvalidCharError) -> Self +pub fn hex_conservative::error::DecodeVariableLengthBytesError::from(e: hex_conservative::error::OddLengthStringError) -> Self +pub fn hex_conservative::error::DecodeVariableLengthBytesError::from(never: core::convert::Infallible) -> Self +pub fn hex_conservative::error::DecodeVariableLengthBytesError::offset(self, by_bytes: usize) -> Self +pub fn hex_conservative::error::InvalidCharError::clone(&self) -> hex_conservative::error::InvalidCharError +pub fn hex_conservative::error::InvalidCharError::eq(&self, other: &hex_conservative::error::InvalidCharError) -> bool +pub fn hex_conservative::error::InvalidCharError::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn hex_conservative::error::InvalidCharError::from(never: core::convert::Infallible) -> Self +pub fn hex_conservative::error::InvalidCharError::offset(self, by_bytes: usize) -> Self +pub fn hex_conservative::error::InvalidCharError::pos(&self) -> usize +pub fn hex_conservative::error::InvalidLengthError::clone(&self) -> hex_conservative::error::InvalidLengthError +pub fn hex_conservative::error::InvalidLengthError::eq(&self, other: &hex_conservative::error::InvalidLengthError) -> bool +pub fn hex_conservative::error::InvalidLengthError::expected_length(&self) -> usize +pub fn hex_conservative::error::InvalidLengthError::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn hex_conservative::error::InvalidLengthError::from(never: core::convert::Infallible) -> Self +pub fn hex_conservative::error::InvalidLengthError::invalid_length(&self) -> usize +pub fn hex_conservative::error::OddLengthStringError::clone(&self) -> hex_conservative::error::OddLengthStringError +pub fn hex_conservative::error::OddLengthStringError::eq(&self, other: &hex_conservative::error::OddLengthStringError) -> bool +pub fn hex_conservative::error::OddLengthStringError::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn hex_conservative::error::OddLengthStringError::from(never: core::convert::Infallible) -> Self +pub fn hex_conservative::error::OddLengthStringError::length(&self) -> usize +pub hex_conservative::DecodeFixedLengthBytesError::InvalidChar(hex_conservative::error::InvalidCharError) +pub hex_conservative::DecodeFixedLengthBytesError::InvalidLength(hex_conservative::error::InvalidLengthError) +pub hex_conservative::DecodeVariableLengthBytesError::InvalidChar(hex_conservative::error::InvalidCharError) +pub hex_conservative::DecodeVariableLengthBytesError::OddLengthString(hex_conservative::error::OddLengthStringError) +pub hex_conservative::error::DecodeFixedLengthBytesError::InvalidChar(hex_conservative::error::InvalidCharError) +pub hex_conservative::error::DecodeFixedLengthBytesError::InvalidLength(hex_conservative::error::InvalidLengthError) +pub hex_conservative::error::DecodeVariableLengthBytesError::InvalidChar(hex_conservative::error::InvalidCharError) +pub hex_conservative::error::DecodeVariableLengthBytesError::OddLengthString(hex_conservative::error::OddLengthStringError) +pub mod hex_conservative +pub mod hex_conservative::error +pub struct hex_conservative::error::InvalidCharError +pub struct hex_conservative::error::InvalidLengthError +pub struct hex_conservative::error::OddLengthStringError diff --git a/contrib/check-for-api-changes.sh b/contrib/check-for-api-changes.sh new file mode 100755 index 0000000..b362f91 --- /dev/null +++ b/contrib/check-for-api-changes.sh @@ -0,0 +1,87 @@ +#!/usr/bin/env bash +# +# Checks the public API of crates, exits with non-zero if there are currently +# changes to the public API not already committed to in the various api/*.txt +# files. + +set -euo pipefail + +REPO_DIR=$(git rev-parse --show-toplevel) +API_DIR="$REPO_DIR/api" + +NIGHTLY=$(cat "$REPO_DIR/nightly-version") +# Our docs have broken intra doc links if all features are not enabled. +RUSTDOCFLAGS="-A rustdoc::broken_intra_doc_links" + +# `sort -n -u` doesn't work for some reason. +SORT="sort --numeric-sort" + +# Sort order is affected by locale. See `man sort`. +# > Set LC_ALL=C to get the traditional sort order that uses native byte values. +export LC_ALL=C + +main() { + need_nightly + need_cargo_public_api + + # If script is running in CI the recent lock file is copied into place + # already by the github action job. Locally be kind to the environment. + if [ "${GITHUB_ACTIONS:-}" != "true" ]; then + [ -f "Cargo.lock" ] && mv Cargo.lock Cargo.lock.tmp + cp Cargo-recent.lock Cargo.lock + fi + + run_cargo --no-default-features | $SORT | uniq > "$API_DIR/no-features.txt" + run_cargo --no-default-features --features=alloc | $SORT | uniq > "$API_DIR/alloc-only.txt" + run_cargo_all_features | $SORT | uniq > "$API_DIR/all-features.txt" + + [ -f "Cargo.lock.tmp" ] && mv Cargo.lock.tmp Cargo.lock + + check_for_changes +} + +# Check if there are changes (dirty git index) to the `api/` directory. +check_for_changes() { + if [[ $(git status --porcelain api) ]]; then + git diff --color=always + echo + err "You have introduced changes to the public API, commit the changes to api/ currently in your working directory" + else + echo "No changes to the current public API" + fi +} + +# Run cargo when --all-features is not used. +run_cargo() { + RUSTDOCFLAGS="$RUSTDOCFLAGS" cargo +"$NIGHTLY" --locked public-api --simplified "$@" +} + +# Run cargo with all features enabled. +run_cargo_all_features() { + cargo +"$NIGHTLY" --locked public-api --simplified --all-features +} + +need_nightly() { + cargo_ver=$(cargo +"$NIGHTLY" --version) + if echo "$cargo_ver" | grep -q -v nightly; then + err "Need a nightly compiler; have $cargo_ver" + fi +} + +need_cargo_public_api() { + if command -v cargo-public-api > /dev/null; then + return + fi + err "cargo-public-api is not installed; please run 'cargo +nightly install cargo-public-api --locked'" +} + +err() { + echo "$1" >&2 + exit 1 +} + +# +# Main script +# +main "$@" +exit 0 From 52da558ea24089fd4dff3f686836439635e6086c Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Fri, 27 Feb 2026 14:53:56 +1100 Subject: [PATCH 13/15] Run the API checker script BOOM! Only green lines in the diff. We can have confidence now that this branch is API compatible with the `1.x` branch. --- api/all-features.txt | 278 +++++++++++++++++++++++++++++++++++++++++++ api/alloc-only.txt | 261 ++++++++++++++++++++++++++++++++++++++++ api/no-features.txt | 245 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 784 insertions(+) diff --git a/api/all-features.txt b/api/all-features.txt index c499473..f9f02dd 100644 --- a/api/all-features.txt +++ b/api/all-features.txt @@ -1,13 +1,16 @@ +impl core::clone::Clone for hex_conservative::Case impl core::clone::Clone for hex_conservative::error::DecodeFixedLengthBytesError impl core::clone::Clone for hex_conservative::error::DecodeVariableLengthBytesError impl core::clone::Clone for hex_conservative::error::InvalidCharError impl core::clone::Clone for hex_conservative::error::InvalidLengthError impl core::clone::Clone for hex_conservative::error::OddLengthStringError +impl core::cmp::Eq for hex_conservative::Case impl core::cmp::Eq for hex_conservative::error::DecodeFixedLengthBytesError impl core::cmp::Eq for hex_conservative::error::DecodeVariableLengthBytesError impl core::cmp::Eq for hex_conservative::error::InvalidCharError impl core::cmp::Eq for hex_conservative::error::InvalidLengthError impl core::cmp::Eq for hex_conservative::error::OddLengthStringError +impl core::cmp::PartialEq for hex_conservative::Case impl core::cmp::PartialEq for hex_conservative::error::DecodeFixedLengthBytesError impl core::cmp::PartialEq for hex_conservative::error::DecodeVariableLengthBytesError impl core::cmp::PartialEq for hex_conservative::error::InvalidCharError @@ -22,51 +25,66 @@ impl core::convert::From for hex_cons impl core::convert::From for hex_conservative::error::DecodeVariableLengthBytesError impl core::convert::From for hex_conservative::error::DecodeFixedLengthBytesError impl core::convert::From for hex_conservative::error::DecodeVariableLengthBytesError +impl core::default::Default for hex_conservative::Case impl core::error::Error for hex_conservative::error::DecodeFixedLengthBytesError impl core::error::Error for hex_conservative::error::DecodeVariableLengthBytesError impl core::error::Error for hex_conservative::error::InvalidCharError impl core::error::Error for hex_conservative::error::InvalidLengthError impl core::error::Error for hex_conservative::error::OddLengthStringError +impl core::fmt::Debug for hex_conservative::Case +impl core::fmt::Debug for hex_conservative::display::DisplayByteSlice<'_> impl core::fmt::Debug for hex_conservative::error::DecodeFixedLengthBytesError impl core::fmt::Debug for hex_conservative::error::DecodeVariableLengthBytesError impl core::fmt::Debug for hex_conservative::error::InvalidCharError impl core::fmt::Debug for hex_conservative::error::InvalidLengthError impl core::fmt::Debug for hex_conservative::error::OddLengthStringError +impl core::fmt::Display for hex_conservative::display::DisplayByteSlice<'_> impl core::fmt::Display for hex_conservative::error::DecodeFixedLengthBytesError impl core::fmt::Display for hex_conservative::error::DecodeVariableLengthBytesError impl core::fmt::Display for hex_conservative::error::InvalidCharError impl core::fmt::Display for hex_conservative::error::InvalidLengthError impl core::fmt::Display for hex_conservative::error::OddLengthStringError +impl core::fmt::LowerHex for hex_conservative::display::DisplayByteSlice<'_> +impl core::fmt::UpperHex for hex_conservative::display::DisplayByteSlice<'_> +impl core::hash::Hash for hex_conservative::Case +impl core::marker::Copy for hex_conservative::Case +impl core::marker::Freeze for hex_conservative::Case impl core::marker::Freeze for hex_conservative::error::DecodeFixedLengthBytesError impl core::marker::Freeze for hex_conservative::error::DecodeVariableLengthBytesError impl core::marker::Freeze for hex_conservative::error::InvalidCharError impl core::marker::Freeze for hex_conservative::error::InvalidLengthError impl core::marker::Freeze for hex_conservative::error::OddLengthStringError +impl core::marker::Send for hex_conservative::Case impl core::marker::Send for hex_conservative::error::DecodeFixedLengthBytesError impl core::marker::Send for hex_conservative::error::DecodeVariableLengthBytesError impl core::marker::Send for hex_conservative::error::InvalidCharError impl core::marker::Send for hex_conservative::error::InvalidLengthError impl core::marker::Send for hex_conservative::error::OddLengthStringError +impl core::marker::StructuralPartialEq for hex_conservative::Case impl core::marker::StructuralPartialEq for hex_conservative::error::DecodeFixedLengthBytesError impl core::marker::StructuralPartialEq for hex_conservative::error::DecodeVariableLengthBytesError impl core::marker::StructuralPartialEq for hex_conservative::error::InvalidCharError impl core::marker::StructuralPartialEq for hex_conservative::error::InvalidLengthError impl core::marker::StructuralPartialEq for hex_conservative::error::OddLengthStringError +impl core::marker::Sync for hex_conservative::Case impl core::marker::Sync for hex_conservative::error::DecodeFixedLengthBytesError impl core::marker::Sync for hex_conservative::error::DecodeVariableLengthBytesError impl core::marker::Sync for hex_conservative::error::InvalidCharError impl core::marker::Sync for hex_conservative::error::InvalidLengthError impl core::marker::Sync for hex_conservative::error::OddLengthStringError +impl core::marker::Unpin for hex_conservative::Case impl core::marker::Unpin for hex_conservative::error::DecodeFixedLengthBytesError impl core::marker::Unpin for hex_conservative::error::DecodeVariableLengthBytesError impl core::marker::Unpin for hex_conservative::error::InvalidCharError impl core::marker::Unpin for hex_conservative::error::InvalidLengthError impl core::marker::Unpin for hex_conservative::error::OddLengthStringError +impl core::panic::unwind_safe::RefUnwindSafe for hex_conservative::Case impl core::panic::unwind_safe::RefUnwindSafe for hex_conservative::error::DecodeFixedLengthBytesError impl core::panic::unwind_safe::RefUnwindSafe for hex_conservative::error::DecodeVariableLengthBytesError impl core::panic::unwind_safe::RefUnwindSafe for hex_conservative::error::InvalidCharError impl core::panic::unwind_safe::RefUnwindSafe for hex_conservative::error::InvalidLengthError impl core::panic::unwind_safe::RefUnwindSafe for hex_conservative::error::OddLengthStringError +impl core::panic::unwind_safe::UnwindSafe for hex_conservative::Case impl core::panic::unwind_safe::UnwindSafe for hex_conservative::error::DecodeFixedLengthBytesError impl core::panic::unwind_safe::UnwindSafe for hex_conservative::error::DecodeVariableLengthBytesError impl core::panic::unwind_safe::UnwindSafe for hex_conservative::error::InvalidCharError @@ -77,12 +95,209 @@ impl hex_conservative::error::DecodeVariableLengthBytesError impl hex_conservative::error::InvalidCharError impl hex_conservative::error::InvalidLengthError impl hex_conservative::error::OddLengthStringError +impl<'a, const CAP: usize> core::marker::Freeze for hex_conservative::display::DisplayArray<'a, CAP> +impl<'a, const CAP: usize> core::marker::Send for hex_conservative::display::DisplayArray<'a, CAP> +impl<'a, const CAP: usize> core::marker::Sync for hex_conservative::display::DisplayArray<'a, CAP> +impl<'a, const CAP: usize> core::marker::Unpin for hex_conservative::display::DisplayArray<'a, CAP> +impl<'a, const CAP: usize> core::panic::unwind_safe::RefUnwindSafe for hex_conservative::display::DisplayArray<'a, CAP> +impl<'a, const CAP: usize> core::panic::unwind_safe::UnwindSafe for hex_conservative::display::DisplayArray<'a, CAP> +impl<'a> core::marker::Freeze for hex_conservative::display::DisplayByteSlice<'a> +impl<'a> core::marker::Send for hex_conservative::display::DisplayByteSlice<'a> +impl<'a> core::marker::Sync for hex_conservative::display::DisplayByteSlice<'a> +impl<'a> core::marker::Unpin for hex_conservative::display::DisplayByteSlice<'a> +impl<'a> core::panic::unwind_safe::RefUnwindSafe for hex_conservative::display::DisplayByteSlice<'a> +impl<'a> core::panic::unwind_safe::UnwindSafe for hex_conservative::display::DisplayByteSlice<'a> +impl<'a> hex_conservative::HexToBytesIter> +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 1024] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 10] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 11] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 128] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 12] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 13] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 14] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 15] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 16] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 1] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 2048] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 20] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 256] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 2] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 32] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 33] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 3] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 4096] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 4] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 512] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 5] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 64] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 65] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 6] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 7] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 8] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 9] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8] +impl<'a> hex_conservative::display::DisplayHex for &'a alloc::vec::Vec +impl core::fmt::Debug for hex_conservative::BytesToHexIter where I: core::iter::traits::iterator::Iterator + core::fmt::Debug, ::Item: core::borrow::Borrow +impl core::fmt::Debug for hex_conservative::HexToBytesIter where I: core::iter::traits::iterator::Iterator + core::fmt::Debug +impl core::iter::traits::double_ended::DoubleEndedIterator for hex_conservative::BytesToHexIter where I: core::iter::traits::double_ended::DoubleEndedIterator, ::Item: core::borrow::Borrow +impl core::iter::traits::double_ended::DoubleEndedIterator for hex_conservative::HexToBytesIter where I: core::iter::traits::iterator::Iterator + core::iter::traits::double_ended::DoubleEndedIterator + core::iter::traits::exact_size::ExactSizeIterator +impl core::iter::traits::exact_size::ExactSizeIterator for hex_conservative::BytesToHexIter where I: core::iter::traits::exact_size::ExactSizeIterator, ::Item: core::borrow::Borrow +impl core::iter::traits::exact_size::ExactSizeIterator for hex_conservative::HexToBytesIter where I: core::iter::traits::iterator::Iterator + core::iter::traits::exact_size::ExactSizeIterator +impl core::iter::traits::iterator::Iterator for hex_conservative::BytesToHexIter where I: core::iter::traits::iterator::Iterator, ::Item: core::borrow::Borrow +impl core::iter::traits::iterator::Iterator for hex_conservative::HexToBytesIter where I: core::iter::traits::iterator::Iterator + core::iter::traits::exact_size::ExactSizeIterator +impl core::iter::traits::marker::FusedIterator for hex_conservative::BytesToHexIter where I: core::iter::traits::marker::FusedIterator, ::Item: core::borrow::Borrow +impl core::iter::traits::marker::FusedIterator for hex_conservative::HexToBytesIter where I: core::iter::traits::iterator::Iterator + core::iter::traits::exact_size::ExactSizeIterator + core::iter::traits::marker::FusedIterator +impl core::marker::Freeze for hex_conservative::BytesToHexIter where I: core::marker::Freeze +impl core::marker::Freeze for hex_conservative::HexToBytesIter where I: core::marker::Freeze +impl core::marker::Send for hex_conservative::BytesToHexIter where I: core::marker::Send +impl core::marker::Send for hex_conservative::HexToBytesIter where I: core::marker::Send +impl core::marker::Sync for hex_conservative::BytesToHexIter where I: core::marker::Sync +impl core::marker::Sync for hex_conservative::HexToBytesIter where I: core::marker::Sync +impl core::marker::Unpin for hex_conservative::BytesToHexIter where I: core::marker::Unpin +impl core::marker::Unpin for hex_conservative::HexToBytesIter where I: core::marker::Unpin +impl core::panic::unwind_safe::RefUnwindSafe for hex_conservative::BytesToHexIter where I: core::panic::unwind_safe::RefUnwindSafe +impl core::panic::unwind_safe::RefUnwindSafe for hex_conservative::HexToBytesIter where I: core::panic::unwind_safe::RefUnwindSafe +impl core::panic::unwind_safe::UnwindSafe for hex_conservative::BytesToHexIter where I: core::panic::unwind_safe::UnwindSafe +impl core::panic::unwind_safe::UnwindSafe for hex_conservative::HexToBytesIter where I: core::panic::unwind_safe::UnwindSafe +impl hex_conservative::BytesToHexIter where I: core::iter::traits::iterator::Iterator, ::Item: core::borrow::Borrow +impl hex_conservative::HexToBytesIter where I: core::iter::traits::iterator::Iterator + core::iter::traits::exact_size::ExactSizeIterator +impl std::io::Read for hex_conservative::HexToBytesIter where I: core::iter::traits::iterator::Iterator + core::iter::traits::exact_size::ExactSizeIterator + core::iter::traits::marker::FusedIterator +impl core::fmt::Debug for hex_conservative::display::HexWriter +impl core::marker::Freeze for hex_conservative::display::HexWriter where T: core::marker::Freeze +impl core::marker::Send for hex_conservative::display::HexWriter where T: core::marker::Send +impl core::marker::Sync for hex_conservative::display::HexWriter where T: core::marker::Sync +impl core::marker::Unpin for hex_conservative::display::HexWriter where T: core::marker::Unpin +impl core::panic::unwind_safe::RefUnwindSafe for hex_conservative::display::HexWriter where T: core::panic::unwind_safe::RefUnwindSafe +impl core::panic::unwind_safe::UnwindSafe for hex_conservative::display::HexWriter where T: core::panic::unwind_safe::UnwindSafe +impl hex_conservative::display::HexWriter +impl std::io::Write for hex_conservative::display::HexWriter where T: core::fmt::Write +impl core::default::Default for hex_conservative::buf_encoder::BufEncoder +impl core::fmt::Debug for hex_conservative::buf_encoder::BufEncoder +impl core::marker::Freeze for hex_conservative::buf_encoder::BufEncoder +impl core::marker::Send for hex_conservative::buf_encoder::BufEncoder +impl core::marker::Sync for hex_conservative::buf_encoder::BufEncoder +impl core::marker::Unpin for hex_conservative::buf_encoder::BufEncoder +impl core::panic::unwind_safe::RefUnwindSafe for hex_conservative::buf_encoder::BufEncoder +impl core::panic::unwind_safe::UnwindSafe for hex_conservative::buf_encoder::BufEncoder +impl hex_conservative::buf_encoder::BufEncoder +impl core::fmt::Debug for hex_conservative::display::DisplayArray<'_, LEN> +impl core::fmt::Display for hex_conservative::display::DisplayArray<'_, LEN> +impl core::fmt::LowerHex for hex_conservative::display::DisplayArray<'_, LEN> +impl core::fmt::UpperHex for hex_conservative::display::DisplayArray<'_, LEN> +pub enum hex_conservative::Case pub enum hex_conservative::DecodeFixedLengthBytesError pub enum hex_conservative::DecodeVariableLengthBytesError pub enum hex_conservative::error::DecodeFixedLengthBytesError pub enum hex_conservative::error::DecodeVariableLengthBytesError +pub fn &'a [u8; 1024]::as_hex(self) -> Self::Display +pub fn &'a [u8; 1024]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 10]::as_hex(self) -> Self::Display +pub fn &'a [u8; 10]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 11]::as_hex(self) -> Self::Display +pub fn &'a [u8; 11]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 128]::as_hex(self) -> Self::Display +pub fn &'a [u8; 128]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 12]::as_hex(self) -> Self::Display +pub fn &'a [u8; 12]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 13]::as_hex(self) -> Self::Display +pub fn &'a [u8; 13]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 14]::as_hex(self) -> Self::Display +pub fn &'a [u8; 14]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 15]::as_hex(self) -> Self::Display +pub fn &'a [u8; 15]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 16]::as_hex(self) -> Self::Display +pub fn &'a [u8; 16]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 1]::as_hex(self) -> Self::Display +pub fn &'a [u8; 1]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 2048]::as_hex(self) -> Self::Display +pub fn &'a [u8; 2048]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 20]::as_hex(self) -> Self::Display +pub fn &'a [u8; 20]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 256]::as_hex(self) -> Self::Display +pub fn &'a [u8; 256]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 2]::as_hex(self) -> Self::Display +pub fn &'a [u8; 2]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 32]::as_hex(self) -> Self::Display +pub fn &'a [u8; 32]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 33]::as_hex(self) -> Self::Display +pub fn &'a [u8; 33]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 3]::as_hex(self) -> Self::Display +pub fn &'a [u8; 3]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 4096]::as_hex(self) -> Self::Display +pub fn &'a [u8; 4096]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 4]::as_hex(self) -> Self::Display +pub fn &'a [u8; 4]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 512]::as_hex(self) -> Self::Display +pub fn &'a [u8; 512]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 5]::as_hex(self) -> Self::Display +pub fn &'a [u8; 5]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 64]::as_hex(self) -> Self::Display +pub fn &'a [u8; 64]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 65]::as_hex(self) -> Self::Display +pub fn &'a [u8; 65]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 6]::as_hex(self) -> Self::Display +pub fn &'a [u8; 6]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 7]::as_hex(self) -> Self::Display +pub fn &'a [u8; 7]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 8]::as_hex(self) -> Self::Display +pub fn &'a [u8; 8]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 9]::as_hex(self) -> Self::Display +pub fn &'a [u8; 9]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8]::as_hex(self) -> Self::Display +pub fn &'a [u8]::hex_reserve_suggestion(self) -> usize +pub fn &'a alloc::vec::Vec::as_hex(self) -> Self::Display +pub fn &'a alloc::vec::Vec::hex_reserve_suggestion(self) -> usize +pub fn hex_conservative::BytesToHexIter::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn hex_conservative::BytesToHexIter::len(&self) -> usize +pub fn hex_conservative::BytesToHexIter::new(iter: I, case: hex_conservative::Case) -> hex_conservative::BytesToHexIter +pub fn hex_conservative::BytesToHexIter::next(&mut self) -> core::option::Option +pub fn hex_conservative::BytesToHexIter::next_back(&mut self) -> core::option::Option +pub fn hex_conservative::BytesToHexIter::size_hint(&self) -> (usize, core::option::Option) +pub fn hex_conservative::Case::clone(&self) -> hex_conservative::Case +pub fn hex_conservative::Case::default() -> Self +pub fn hex_conservative::Case::eq(&self, other: &hex_conservative::Case) -> bool +pub fn hex_conservative::Case::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn hex_conservative::Case::hash<__H: core::hash::Hasher>(&self, state: &mut __H) +pub fn hex_conservative::DisplayHex::append_hex_to_string(self, case: hex_conservative::Case, string: &mut alloc::string::String) +pub fn hex_conservative::DisplayHex::as_hex(self) -> Self::Display +pub fn hex_conservative::DisplayHex::hex_reserve_suggestion(self) -> usize +pub fn hex_conservative::DisplayHex::to_hex_string(self, case: hex_conservative::Case) -> alloc::string::String +pub fn hex_conservative::DisplayHex::to_lower_hex_string(self) -> alloc::string::String +pub fn hex_conservative::DisplayHex::to_upper_hex_string(self) -> alloc::string::String +pub fn hex_conservative::HexToBytesIter::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn hex_conservative::HexToBytesIter::from_pairs(iter: I) -> Self +pub fn hex_conservative::HexToBytesIter::next(&mut self) -> core::option::Option +pub fn hex_conservative::HexToBytesIter::next_back(&mut self) -> core::option::Option +pub fn hex_conservative::HexToBytesIter::nth(&mut self, n: usize) -> core::option::Option +pub fn hex_conservative::HexToBytesIter::nth_back(&mut self, n: usize) -> core::option::Option +pub fn hex_conservative::HexToBytesIter::read(&mut self, buf: &mut [u8]) -> std::io::error::Result +pub fn hex_conservative::HexToBytesIter::size_hint(&self) -> (usize, core::option::Option) +pub fn hex_conservative::HexToBytesIter>::new(s: &'a str) -> core::result::Result +pub fn hex_conservative::buf_encoder::BufEncoder::as_str(&self) -> &str +pub fn hex_conservative::buf_encoder::BufEncoder::clear(&mut self) +pub fn hex_conservative::buf_encoder::BufEncoder::default() -> Self +pub fn hex_conservative::buf_encoder::BufEncoder::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn hex_conservative::buf_encoder::BufEncoder::is_full(&self) -> bool +pub fn hex_conservative::buf_encoder::BufEncoder::new(case: hex_conservative::Case) -> Self +pub fn hex_conservative::buf_encoder::BufEncoder::put_byte(&mut self, byte: u8) +pub fn hex_conservative::buf_encoder::BufEncoder::put_bytes(&mut self, bytes: I) where I: core::iter::traits::collect::IntoIterator, ::Item: core::borrow::Borrow +pub fn hex_conservative::buf_encoder::BufEncoder::put_bytes_min<'a>(&mut self, bytes: &'a [u8]) -> &'a [u8] +pub fn hex_conservative::buf_encoder::BufEncoder::space_remaining(&self) -> usize pub fn hex_conservative::decode_to_array(hex: &str) -> core::result::Result<[u8; N], hex_conservative::error::DecodeFixedLengthBytesError> pub fn hex_conservative::decode_to_vec(hex: &str) -> core::result::Result, hex_conservative::error::DecodeVariableLengthBytesError> +pub fn hex_conservative::display::DisplayArray<'_, LEN>::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn hex_conservative::display::DisplayByteSlice<'_>::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn hex_conservative::display::DisplayHex::append_hex_to_string(self, case: hex_conservative::Case, string: &mut alloc::string::String) +pub fn hex_conservative::display::DisplayHex::as_hex(self) -> Self::Display +pub fn hex_conservative::display::DisplayHex::hex_reserve_suggestion(self) -> usize +pub fn hex_conservative::display::DisplayHex::to_hex_string(self, case: hex_conservative::Case) -> alloc::string::String +pub fn hex_conservative::display::DisplayHex::to_lower_hex_string(self) -> alloc::string::String +pub fn hex_conservative::display::DisplayHex::to_upper_hex_string(self) -> alloc::string::String +pub fn hex_conservative::display::HexWriter::flush(&mut self) -> core::result::Result<(), std::io::error::Error> +pub fn hex_conservative::display::HexWriter::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn hex_conservative::display::HexWriter::into_inner(self) -> T +pub fn hex_conservative::display::HexWriter::new(dest: T, case: hex_conservative::Case) -> Self +pub fn hex_conservative::display::HexWriter::write(&mut self, buf: &[u8]) -> core::result::Result pub fn hex_conservative::error::DecodeFixedLengthBytesError::clone(&self) -> hex_conservative::error::DecodeFixedLengthBytesError pub fn hex_conservative::error::DecodeFixedLengthBytesError::eq(&self, other: &hex_conservative::error::DecodeFixedLengthBytesError) -> bool pub fn hex_conservative::error::DecodeFixedLengthBytesError::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result @@ -116,6 +331,14 @@ pub fn hex_conservative::error::OddLengthStringError::eq(&self, other: &hex_cons pub fn hex_conservative::error::OddLengthStringError::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn hex_conservative::error::OddLengthStringError::from(never: core::convert::Infallible) -> Self pub fn hex_conservative::error::OddLengthStringError::length(&self) -> usize +pub fn hex_conservative::prelude::DisplayHex::append_hex_to_string(self, case: hex_conservative::Case, string: &mut alloc::string::String) +pub fn hex_conservative::prelude::DisplayHex::as_hex(self) -> Self::Display +pub fn hex_conservative::prelude::DisplayHex::hex_reserve_suggestion(self) -> usize +pub fn hex_conservative::prelude::DisplayHex::to_hex_string(self, case: hex_conservative::Case) -> alloc::string::String +pub fn hex_conservative::prelude::DisplayHex::to_lower_hex_string(self) -> alloc::string::String +pub fn hex_conservative::prelude::DisplayHex::to_upper_hex_string(self) -> alloc::string::String +pub hex_conservative::Case::Lower +pub hex_conservative::Case::Upper pub hex_conservative::DecodeFixedLengthBytesError::InvalidChar(hex_conservative::error::InvalidCharError) pub hex_conservative::DecodeFixedLengthBytesError::InvalidLength(hex_conservative::error::InvalidLengthError) pub hex_conservative::DecodeVariableLengthBytesError::InvalidChar(hex_conservative::error::InvalidCharError) @@ -124,8 +347,63 @@ pub hex_conservative::error::DecodeFixedLengthBytesError::InvalidChar(hex_conser pub hex_conservative::error::DecodeFixedLengthBytesError::InvalidLength(hex_conservative::error::InvalidLengthError) pub hex_conservative::error::DecodeVariableLengthBytesError::InvalidChar(hex_conservative::error::InvalidCharError) pub hex_conservative::error::DecodeVariableLengthBytesError::OddLengthString(hex_conservative::error::OddLengthStringError) +pub macro hex_conservative::display::fmt_hex_exact! +pub macro hex_conservative::display::impl_fmt_traits! +pub macro hex_conservative::fmt_hex_exact! +pub macro hex_conservative::hex! +pub macro hex_conservative::impl_fmt_traits! pub mod hex_conservative +pub mod hex_conservative::buf_encoder +pub mod hex_conservative::display pub mod hex_conservative::error +pub mod hex_conservative::prelude +pub struct hex_conservative::BytesToHexIter where I: core::iter::traits::iterator::Iterator, ::Item: core::borrow::Borrow +pub struct hex_conservative::HexToBytesIter where I: core::iter::traits::iterator::Iterator +pub struct hex_conservative::InvalidCharError +pub struct hex_conservative::InvalidLengthError +pub struct hex_conservative::OddLengthStringError +pub struct hex_conservative::buf_encoder::BufEncoder +pub struct hex_conservative::display::DisplayArray<'a, const CAP: usize> +pub struct hex_conservative::display::DisplayByteSlice<'a> +pub struct hex_conservative::display::HexWriter pub struct hex_conservative::error::InvalidCharError pub struct hex_conservative::error::InvalidLengthError pub struct hex_conservative::error::OddLengthStringError +pub trait hex_conservative::DisplayHex: core::marker::Copy + hex_conservative::display::sealed::IsRef + hex_conservative::display::sealed::Sealed +pub trait hex_conservative::display::DisplayHex: core::marker::Copy + hex_conservative::display::sealed::IsRef + hex_conservative::display::sealed::Sealed +pub trait hex_conservative::prelude::DisplayHex: core::marker::Copy + hex_conservative::display::sealed::IsRef + hex_conservative::display::sealed::Sealed +pub type &'a [u8; 1024]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 10]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 11]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 128]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 12]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 13]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 14]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 15]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 16]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 1]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 2048]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 20]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 256]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 2]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 32]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 33]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 3]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 4096]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 4]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 512]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 5]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 64]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 65]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 6]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 7]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 8]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 9]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8]::Display = hex_conservative::display::DisplayByteSlice<'a> +pub type &'a alloc::vec::Vec::Display = hex_conservative::display::DisplayByteSlice<'a> +pub type hex_conservative::BytesToHexIter::Item = char +pub type hex_conservative::DisplayHex::Display: core::fmt::Display + core::fmt::Debug + core::fmt::LowerHex + core::fmt::UpperHex +pub type hex_conservative::HexSliceToBytesIter<'a> = hex_conservative::HexToBytesIter> +pub type hex_conservative::HexToBytesIter::Item = core::result::Result +pub type hex_conservative::display::DisplayHex::Display: core::fmt::Display + core::fmt::Debug + core::fmt::LowerHex + core::fmt::UpperHex +pub type hex_conservative::prelude::DisplayHex::Display: core::fmt::Display + core::fmt::Debug + core::fmt::LowerHex + core::fmt::UpperHex diff --git a/api/alloc-only.txt b/api/alloc-only.txt index 706caae..f6d9ec7 100644 --- a/api/alloc-only.txt +++ b/api/alloc-only.txt @@ -1,13 +1,16 @@ +impl core::clone::Clone for hex_conservative::Case impl core::clone::Clone for hex_conservative::error::DecodeFixedLengthBytesError impl core::clone::Clone for hex_conservative::error::DecodeVariableLengthBytesError impl core::clone::Clone for hex_conservative::error::InvalidCharError impl core::clone::Clone for hex_conservative::error::InvalidLengthError impl core::clone::Clone for hex_conservative::error::OddLengthStringError +impl core::cmp::Eq for hex_conservative::Case impl core::cmp::Eq for hex_conservative::error::DecodeFixedLengthBytesError impl core::cmp::Eq for hex_conservative::error::DecodeVariableLengthBytesError impl core::cmp::Eq for hex_conservative::error::InvalidCharError impl core::cmp::Eq for hex_conservative::error::InvalidLengthError impl core::cmp::Eq for hex_conservative::error::OddLengthStringError +impl core::cmp::PartialEq for hex_conservative::Case impl core::cmp::PartialEq for hex_conservative::error::DecodeFixedLengthBytesError impl core::cmp::PartialEq for hex_conservative::error::DecodeVariableLengthBytesError impl core::cmp::PartialEq for hex_conservative::error::InvalidCharError @@ -22,46 +25,61 @@ impl core::convert::From for hex_cons impl core::convert::From for hex_conservative::error::DecodeVariableLengthBytesError impl core::convert::From for hex_conservative::error::DecodeFixedLengthBytesError impl core::convert::From for hex_conservative::error::DecodeVariableLengthBytesError +impl core::default::Default for hex_conservative::Case +impl core::fmt::Debug for hex_conservative::Case +impl core::fmt::Debug for hex_conservative::display::DisplayByteSlice<'_> impl core::fmt::Debug for hex_conservative::error::DecodeFixedLengthBytesError impl core::fmt::Debug for hex_conservative::error::DecodeVariableLengthBytesError impl core::fmt::Debug for hex_conservative::error::InvalidCharError impl core::fmt::Debug for hex_conservative::error::InvalidLengthError impl core::fmt::Debug for hex_conservative::error::OddLengthStringError +impl core::fmt::Display for hex_conservative::display::DisplayByteSlice<'_> impl core::fmt::Display for hex_conservative::error::DecodeFixedLengthBytesError impl core::fmt::Display for hex_conservative::error::DecodeVariableLengthBytesError impl core::fmt::Display for hex_conservative::error::InvalidCharError impl core::fmt::Display for hex_conservative::error::InvalidLengthError impl core::fmt::Display for hex_conservative::error::OddLengthStringError +impl core::fmt::LowerHex for hex_conservative::display::DisplayByteSlice<'_> +impl core::fmt::UpperHex for hex_conservative::display::DisplayByteSlice<'_> +impl core::hash::Hash for hex_conservative::Case +impl core::marker::Copy for hex_conservative::Case +impl core::marker::Freeze for hex_conservative::Case impl core::marker::Freeze for hex_conservative::error::DecodeFixedLengthBytesError impl core::marker::Freeze for hex_conservative::error::DecodeVariableLengthBytesError impl core::marker::Freeze for hex_conservative::error::InvalidCharError impl core::marker::Freeze for hex_conservative::error::InvalidLengthError impl core::marker::Freeze for hex_conservative::error::OddLengthStringError +impl core::marker::Send for hex_conservative::Case impl core::marker::Send for hex_conservative::error::DecodeFixedLengthBytesError impl core::marker::Send for hex_conservative::error::DecodeVariableLengthBytesError impl core::marker::Send for hex_conservative::error::InvalidCharError impl core::marker::Send for hex_conservative::error::InvalidLengthError impl core::marker::Send for hex_conservative::error::OddLengthStringError +impl core::marker::StructuralPartialEq for hex_conservative::Case impl core::marker::StructuralPartialEq for hex_conservative::error::DecodeFixedLengthBytesError impl core::marker::StructuralPartialEq for hex_conservative::error::DecodeVariableLengthBytesError impl core::marker::StructuralPartialEq for hex_conservative::error::InvalidCharError impl core::marker::StructuralPartialEq for hex_conservative::error::InvalidLengthError impl core::marker::StructuralPartialEq for hex_conservative::error::OddLengthStringError +impl core::marker::Sync for hex_conservative::Case impl core::marker::Sync for hex_conservative::error::DecodeFixedLengthBytesError impl core::marker::Sync for hex_conservative::error::DecodeVariableLengthBytesError impl core::marker::Sync for hex_conservative::error::InvalidCharError impl core::marker::Sync for hex_conservative::error::InvalidLengthError impl core::marker::Sync for hex_conservative::error::OddLengthStringError +impl core::marker::Unpin for hex_conservative::Case impl core::marker::Unpin for hex_conservative::error::DecodeFixedLengthBytesError impl core::marker::Unpin for hex_conservative::error::DecodeVariableLengthBytesError impl core::marker::Unpin for hex_conservative::error::InvalidCharError impl core::marker::Unpin for hex_conservative::error::InvalidLengthError impl core::marker::Unpin for hex_conservative::error::OddLengthStringError +impl core::panic::unwind_safe::RefUnwindSafe for hex_conservative::Case impl core::panic::unwind_safe::RefUnwindSafe for hex_conservative::error::DecodeFixedLengthBytesError impl core::panic::unwind_safe::RefUnwindSafe for hex_conservative::error::DecodeVariableLengthBytesError impl core::panic::unwind_safe::RefUnwindSafe for hex_conservative::error::InvalidCharError impl core::panic::unwind_safe::RefUnwindSafe for hex_conservative::error::InvalidLengthError impl core::panic::unwind_safe::RefUnwindSafe for hex_conservative::error::OddLengthStringError +impl core::panic::unwind_safe::UnwindSafe for hex_conservative::Case impl core::panic::unwind_safe::UnwindSafe for hex_conservative::error::DecodeFixedLengthBytesError impl core::panic::unwind_safe::UnwindSafe for hex_conservative::error::DecodeVariableLengthBytesError impl core::panic::unwind_safe::UnwindSafe for hex_conservative::error::InvalidCharError @@ -72,12 +90,193 @@ impl hex_conservative::error::DecodeVariableLengthBytesError impl hex_conservative::error::InvalidCharError impl hex_conservative::error::InvalidLengthError impl hex_conservative::error::OddLengthStringError +impl<'a, const CAP: usize> core::marker::Freeze for hex_conservative::display::DisplayArray<'a, CAP> +impl<'a, const CAP: usize> core::marker::Send for hex_conservative::display::DisplayArray<'a, CAP> +impl<'a, const CAP: usize> core::marker::Sync for hex_conservative::display::DisplayArray<'a, CAP> +impl<'a, const CAP: usize> core::marker::Unpin for hex_conservative::display::DisplayArray<'a, CAP> +impl<'a, const CAP: usize> core::panic::unwind_safe::RefUnwindSafe for hex_conservative::display::DisplayArray<'a, CAP> +impl<'a, const CAP: usize> core::panic::unwind_safe::UnwindSafe for hex_conservative::display::DisplayArray<'a, CAP> +impl<'a> core::marker::Freeze for hex_conservative::display::DisplayByteSlice<'a> +impl<'a> core::marker::Send for hex_conservative::display::DisplayByteSlice<'a> +impl<'a> core::marker::Sync for hex_conservative::display::DisplayByteSlice<'a> +impl<'a> core::marker::Unpin for hex_conservative::display::DisplayByteSlice<'a> +impl<'a> core::panic::unwind_safe::RefUnwindSafe for hex_conservative::display::DisplayByteSlice<'a> +impl<'a> core::panic::unwind_safe::UnwindSafe for hex_conservative::display::DisplayByteSlice<'a> +impl<'a> hex_conservative::HexToBytesIter> +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 1024] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 10] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 11] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 128] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 12] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 13] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 14] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 15] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 16] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 1] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 2048] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 20] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 256] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 2] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 32] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 33] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 3] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 4096] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 4] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 512] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 5] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 64] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 65] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 6] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 7] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 8] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 9] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8] +impl<'a> hex_conservative::display::DisplayHex for &'a alloc::vec::Vec +impl core::fmt::Debug for hex_conservative::BytesToHexIter where I: core::iter::traits::iterator::Iterator + core::fmt::Debug, ::Item: core::borrow::Borrow +impl core::fmt::Debug for hex_conservative::HexToBytesIter where I: core::iter::traits::iterator::Iterator + core::fmt::Debug +impl core::iter::traits::double_ended::DoubleEndedIterator for hex_conservative::BytesToHexIter where I: core::iter::traits::double_ended::DoubleEndedIterator, ::Item: core::borrow::Borrow +impl core::iter::traits::double_ended::DoubleEndedIterator for hex_conservative::HexToBytesIter where I: core::iter::traits::iterator::Iterator + core::iter::traits::double_ended::DoubleEndedIterator + core::iter::traits::exact_size::ExactSizeIterator +impl core::iter::traits::exact_size::ExactSizeIterator for hex_conservative::BytesToHexIter where I: core::iter::traits::exact_size::ExactSizeIterator, ::Item: core::borrow::Borrow +impl core::iter::traits::exact_size::ExactSizeIterator for hex_conservative::HexToBytesIter where I: core::iter::traits::iterator::Iterator + core::iter::traits::exact_size::ExactSizeIterator +impl core::iter::traits::iterator::Iterator for hex_conservative::BytesToHexIter where I: core::iter::traits::iterator::Iterator, ::Item: core::borrow::Borrow +impl core::iter::traits::iterator::Iterator for hex_conservative::HexToBytesIter where I: core::iter::traits::iterator::Iterator + core::iter::traits::exact_size::ExactSizeIterator +impl core::iter::traits::marker::FusedIterator for hex_conservative::BytesToHexIter where I: core::iter::traits::marker::FusedIterator, ::Item: core::borrow::Borrow +impl core::iter::traits::marker::FusedIterator for hex_conservative::HexToBytesIter where I: core::iter::traits::iterator::Iterator + core::iter::traits::exact_size::ExactSizeIterator + core::iter::traits::marker::FusedIterator +impl core::marker::Freeze for hex_conservative::BytesToHexIter where I: core::marker::Freeze +impl core::marker::Freeze for hex_conservative::HexToBytesIter where I: core::marker::Freeze +impl core::marker::Send for hex_conservative::BytesToHexIter where I: core::marker::Send +impl core::marker::Send for hex_conservative::HexToBytesIter where I: core::marker::Send +impl core::marker::Sync for hex_conservative::BytesToHexIter where I: core::marker::Sync +impl core::marker::Sync for hex_conservative::HexToBytesIter where I: core::marker::Sync +impl core::marker::Unpin for hex_conservative::BytesToHexIter where I: core::marker::Unpin +impl core::marker::Unpin for hex_conservative::HexToBytesIter where I: core::marker::Unpin +impl core::panic::unwind_safe::RefUnwindSafe for hex_conservative::BytesToHexIter where I: core::panic::unwind_safe::RefUnwindSafe +impl core::panic::unwind_safe::RefUnwindSafe for hex_conservative::HexToBytesIter where I: core::panic::unwind_safe::RefUnwindSafe +impl core::panic::unwind_safe::UnwindSafe for hex_conservative::BytesToHexIter where I: core::panic::unwind_safe::UnwindSafe +impl core::panic::unwind_safe::UnwindSafe for hex_conservative::HexToBytesIter where I: core::panic::unwind_safe::UnwindSafe +impl hex_conservative::BytesToHexIter where I: core::iter::traits::iterator::Iterator, ::Item: core::borrow::Borrow +impl hex_conservative::HexToBytesIter where I: core::iter::traits::iterator::Iterator + core::iter::traits::exact_size::ExactSizeIterator +impl core::default::Default for hex_conservative::buf_encoder::BufEncoder +impl core::fmt::Debug for hex_conservative::buf_encoder::BufEncoder +impl core::marker::Freeze for hex_conservative::buf_encoder::BufEncoder +impl core::marker::Send for hex_conservative::buf_encoder::BufEncoder +impl core::marker::Sync for hex_conservative::buf_encoder::BufEncoder +impl core::marker::Unpin for hex_conservative::buf_encoder::BufEncoder +impl core::panic::unwind_safe::RefUnwindSafe for hex_conservative::buf_encoder::BufEncoder +impl core::panic::unwind_safe::UnwindSafe for hex_conservative::buf_encoder::BufEncoder +impl hex_conservative::buf_encoder::BufEncoder +impl core::fmt::Debug for hex_conservative::display::DisplayArray<'_, LEN> +impl core::fmt::Display for hex_conservative::display::DisplayArray<'_, LEN> +impl core::fmt::LowerHex for hex_conservative::display::DisplayArray<'_, LEN> +impl core::fmt::UpperHex for hex_conservative::display::DisplayArray<'_, LEN> +pub enum hex_conservative::Case pub enum hex_conservative::DecodeFixedLengthBytesError pub enum hex_conservative::DecodeVariableLengthBytesError pub enum hex_conservative::error::DecodeFixedLengthBytesError pub enum hex_conservative::error::DecodeVariableLengthBytesError +pub fn &'a [u8; 1024]::as_hex(self) -> Self::Display +pub fn &'a [u8; 1024]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 10]::as_hex(self) -> Self::Display +pub fn &'a [u8; 10]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 11]::as_hex(self) -> Self::Display +pub fn &'a [u8; 11]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 128]::as_hex(self) -> Self::Display +pub fn &'a [u8; 128]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 12]::as_hex(self) -> Self::Display +pub fn &'a [u8; 12]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 13]::as_hex(self) -> Self::Display +pub fn &'a [u8; 13]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 14]::as_hex(self) -> Self::Display +pub fn &'a [u8; 14]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 15]::as_hex(self) -> Self::Display +pub fn &'a [u8; 15]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 16]::as_hex(self) -> Self::Display +pub fn &'a [u8; 16]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 1]::as_hex(self) -> Self::Display +pub fn &'a [u8; 1]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 2048]::as_hex(self) -> Self::Display +pub fn &'a [u8; 2048]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 20]::as_hex(self) -> Self::Display +pub fn &'a [u8; 20]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 256]::as_hex(self) -> Self::Display +pub fn &'a [u8; 256]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 2]::as_hex(self) -> Self::Display +pub fn &'a [u8; 2]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 32]::as_hex(self) -> Self::Display +pub fn &'a [u8; 32]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 33]::as_hex(self) -> Self::Display +pub fn &'a [u8; 33]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 3]::as_hex(self) -> Self::Display +pub fn &'a [u8; 3]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 4096]::as_hex(self) -> Self::Display +pub fn &'a [u8; 4096]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 4]::as_hex(self) -> Self::Display +pub fn &'a [u8; 4]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 512]::as_hex(self) -> Self::Display +pub fn &'a [u8; 512]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 5]::as_hex(self) -> Self::Display +pub fn &'a [u8; 5]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 64]::as_hex(self) -> Self::Display +pub fn &'a [u8; 64]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 65]::as_hex(self) -> Self::Display +pub fn &'a [u8; 65]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 6]::as_hex(self) -> Self::Display +pub fn &'a [u8; 6]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 7]::as_hex(self) -> Self::Display +pub fn &'a [u8; 7]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 8]::as_hex(self) -> Self::Display +pub fn &'a [u8; 8]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 9]::as_hex(self) -> Self::Display +pub fn &'a [u8; 9]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8]::as_hex(self) -> Self::Display +pub fn &'a [u8]::hex_reserve_suggestion(self) -> usize +pub fn &'a alloc::vec::Vec::as_hex(self) -> Self::Display +pub fn &'a alloc::vec::Vec::hex_reserve_suggestion(self) -> usize +pub fn hex_conservative::BytesToHexIter::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn hex_conservative::BytesToHexIter::len(&self) -> usize +pub fn hex_conservative::BytesToHexIter::new(iter: I, case: hex_conservative::Case) -> hex_conservative::BytesToHexIter +pub fn hex_conservative::BytesToHexIter::next(&mut self) -> core::option::Option +pub fn hex_conservative::BytesToHexIter::next_back(&mut self) -> core::option::Option +pub fn hex_conservative::BytesToHexIter::size_hint(&self) -> (usize, core::option::Option) +pub fn hex_conservative::Case::clone(&self) -> hex_conservative::Case +pub fn hex_conservative::Case::default() -> Self +pub fn hex_conservative::Case::eq(&self, other: &hex_conservative::Case) -> bool +pub fn hex_conservative::Case::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn hex_conservative::Case::hash<__H: core::hash::Hasher>(&self, state: &mut __H) +pub fn hex_conservative::DisplayHex::append_hex_to_string(self, case: hex_conservative::Case, string: &mut alloc::string::String) +pub fn hex_conservative::DisplayHex::as_hex(self) -> Self::Display +pub fn hex_conservative::DisplayHex::hex_reserve_suggestion(self) -> usize +pub fn hex_conservative::DisplayHex::to_hex_string(self, case: hex_conservative::Case) -> alloc::string::String +pub fn hex_conservative::DisplayHex::to_lower_hex_string(self) -> alloc::string::String +pub fn hex_conservative::DisplayHex::to_upper_hex_string(self) -> alloc::string::String +pub fn hex_conservative::HexToBytesIter::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn hex_conservative::HexToBytesIter::from_pairs(iter: I) -> Self +pub fn hex_conservative::HexToBytesIter::next(&mut self) -> core::option::Option +pub fn hex_conservative::HexToBytesIter::next_back(&mut self) -> core::option::Option +pub fn hex_conservative::HexToBytesIter::nth(&mut self, n: usize) -> core::option::Option +pub fn hex_conservative::HexToBytesIter::nth_back(&mut self, n: usize) -> core::option::Option +pub fn hex_conservative::HexToBytesIter::size_hint(&self) -> (usize, core::option::Option) +pub fn hex_conservative::HexToBytesIter>::new(s: &'a str) -> core::result::Result +pub fn hex_conservative::buf_encoder::BufEncoder::as_str(&self) -> &str +pub fn hex_conservative::buf_encoder::BufEncoder::clear(&mut self) +pub fn hex_conservative::buf_encoder::BufEncoder::default() -> Self +pub fn hex_conservative::buf_encoder::BufEncoder::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn hex_conservative::buf_encoder::BufEncoder::is_full(&self) -> bool +pub fn hex_conservative::buf_encoder::BufEncoder::new(case: hex_conservative::Case) -> Self +pub fn hex_conservative::buf_encoder::BufEncoder::put_byte(&mut self, byte: u8) +pub fn hex_conservative::buf_encoder::BufEncoder::put_bytes(&mut self, bytes: I) where I: core::iter::traits::collect::IntoIterator, ::Item: core::borrow::Borrow +pub fn hex_conservative::buf_encoder::BufEncoder::put_bytes_min<'a>(&mut self, bytes: &'a [u8]) -> &'a [u8] +pub fn hex_conservative::buf_encoder::BufEncoder::space_remaining(&self) -> usize pub fn hex_conservative::decode_to_array(hex: &str) -> core::result::Result<[u8; N], hex_conservative::error::DecodeFixedLengthBytesError> pub fn hex_conservative::decode_to_vec(hex: &str) -> core::result::Result, hex_conservative::error::DecodeVariableLengthBytesError> +pub fn hex_conservative::display::DisplayArray<'_, LEN>::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn hex_conservative::display::DisplayByteSlice<'_>::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn hex_conservative::display::DisplayHex::append_hex_to_string(self, case: hex_conservative::Case, string: &mut alloc::string::String) +pub fn hex_conservative::display::DisplayHex::as_hex(self) -> Self::Display +pub fn hex_conservative::display::DisplayHex::hex_reserve_suggestion(self) -> usize +pub fn hex_conservative::display::DisplayHex::to_hex_string(self, case: hex_conservative::Case) -> alloc::string::String +pub fn hex_conservative::display::DisplayHex::to_lower_hex_string(self) -> alloc::string::String +pub fn hex_conservative::display::DisplayHex::to_upper_hex_string(self) -> alloc::string::String pub fn hex_conservative::error::DecodeFixedLengthBytesError::clone(&self) -> hex_conservative::error::DecodeFixedLengthBytesError pub fn hex_conservative::error::DecodeFixedLengthBytesError::eq(&self, other: &hex_conservative::error::DecodeFixedLengthBytesError) -> bool pub fn hex_conservative::error::DecodeFixedLengthBytesError::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result @@ -109,6 +308,14 @@ pub fn hex_conservative::error::OddLengthStringError::eq(&self, other: &hex_cons pub fn hex_conservative::error::OddLengthStringError::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn hex_conservative::error::OddLengthStringError::from(never: core::convert::Infallible) -> Self pub fn hex_conservative::error::OddLengthStringError::length(&self) -> usize +pub fn hex_conservative::prelude::DisplayHex::append_hex_to_string(self, case: hex_conservative::Case, string: &mut alloc::string::String) +pub fn hex_conservative::prelude::DisplayHex::as_hex(self) -> Self::Display +pub fn hex_conservative::prelude::DisplayHex::hex_reserve_suggestion(self) -> usize +pub fn hex_conservative::prelude::DisplayHex::to_hex_string(self, case: hex_conservative::Case) -> alloc::string::String +pub fn hex_conservative::prelude::DisplayHex::to_lower_hex_string(self) -> alloc::string::String +pub fn hex_conservative::prelude::DisplayHex::to_upper_hex_string(self) -> alloc::string::String +pub hex_conservative::Case::Lower +pub hex_conservative::Case::Upper pub hex_conservative::DecodeFixedLengthBytesError::InvalidChar(hex_conservative::error::InvalidCharError) pub hex_conservative::DecodeFixedLengthBytesError::InvalidLength(hex_conservative::error::InvalidLengthError) pub hex_conservative::DecodeVariableLengthBytesError::InvalidChar(hex_conservative::error::InvalidCharError) @@ -117,8 +324,62 @@ pub hex_conservative::error::DecodeFixedLengthBytesError::InvalidChar(hex_conser pub hex_conservative::error::DecodeFixedLengthBytesError::InvalidLength(hex_conservative::error::InvalidLengthError) pub hex_conservative::error::DecodeVariableLengthBytesError::InvalidChar(hex_conservative::error::InvalidCharError) pub hex_conservative::error::DecodeVariableLengthBytesError::OddLengthString(hex_conservative::error::OddLengthStringError) +pub macro hex_conservative::display::fmt_hex_exact! +pub macro hex_conservative::display::impl_fmt_traits! +pub macro hex_conservative::fmt_hex_exact! +pub macro hex_conservative::hex! +pub macro hex_conservative::impl_fmt_traits! pub mod hex_conservative +pub mod hex_conservative::buf_encoder +pub mod hex_conservative::display pub mod hex_conservative::error +pub mod hex_conservative::prelude +pub struct hex_conservative::BytesToHexIter where I: core::iter::traits::iterator::Iterator, ::Item: core::borrow::Borrow +pub struct hex_conservative::HexToBytesIter where I: core::iter::traits::iterator::Iterator +pub struct hex_conservative::InvalidCharError +pub struct hex_conservative::InvalidLengthError +pub struct hex_conservative::OddLengthStringError +pub struct hex_conservative::buf_encoder::BufEncoder +pub struct hex_conservative::display::DisplayArray<'a, const CAP: usize> +pub struct hex_conservative::display::DisplayByteSlice<'a> pub struct hex_conservative::error::InvalidCharError pub struct hex_conservative::error::InvalidLengthError pub struct hex_conservative::error::OddLengthStringError +pub trait hex_conservative::DisplayHex: core::marker::Copy + hex_conservative::display::sealed::IsRef + hex_conservative::display::sealed::Sealed +pub trait hex_conservative::display::DisplayHex: core::marker::Copy + hex_conservative::display::sealed::IsRef + hex_conservative::display::sealed::Sealed +pub trait hex_conservative::prelude::DisplayHex: core::marker::Copy + hex_conservative::display::sealed::IsRef + hex_conservative::display::sealed::Sealed +pub type &'a [u8; 1024]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 10]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 11]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 128]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 12]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 13]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 14]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 15]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 16]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 1]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 2048]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 20]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 256]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 2]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 32]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 33]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 3]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 4096]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 4]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 512]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 5]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 64]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 65]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 6]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 7]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 8]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 9]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8]::Display = hex_conservative::display::DisplayByteSlice<'a> +pub type &'a alloc::vec::Vec::Display = hex_conservative::display::DisplayByteSlice<'a> +pub type hex_conservative::BytesToHexIter::Item = char +pub type hex_conservative::DisplayHex::Display: core::fmt::Display + core::fmt::Debug + core::fmt::LowerHex + core::fmt::UpperHex +pub type hex_conservative::HexSliceToBytesIter<'a> = hex_conservative::HexToBytesIter> +pub type hex_conservative::HexToBytesIter::Item = core::result::Result +pub type hex_conservative::display::DisplayHex::Display: core::fmt::Display + core::fmt::Debug + core::fmt::LowerHex + core::fmt::UpperHex +pub type hex_conservative::prelude::DisplayHex::Display: core::fmt::Display + core::fmt::Debug + core::fmt::LowerHex + core::fmt::UpperHex diff --git a/api/no-features.txt b/api/no-features.txt index 4c56557..cd001e6 100644 --- a/api/no-features.txt +++ b/api/no-features.txt @@ -1,13 +1,16 @@ +impl core::clone::Clone for hex_conservative::Case impl core::clone::Clone for hex_conservative::error::DecodeFixedLengthBytesError impl core::clone::Clone for hex_conservative::error::DecodeVariableLengthBytesError impl core::clone::Clone for hex_conservative::error::InvalidCharError impl core::clone::Clone for hex_conservative::error::InvalidLengthError impl core::clone::Clone for hex_conservative::error::OddLengthStringError +impl core::cmp::Eq for hex_conservative::Case impl core::cmp::Eq for hex_conservative::error::DecodeFixedLengthBytesError impl core::cmp::Eq for hex_conservative::error::DecodeVariableLengthBytesError impl core::cmp::Eq for hex_conservative::error::InvalidCharError impl core::cmp::Eq for hex_conservative::error::InvalidLengthError impl core::cmp::Eq for hex_conservative::error::OddLengthStringError +impl core::cmp::PartialEq for hex_conservative::Case impl core::cmp::PartialEq for hex_conservative::error::DecodeFixedLengthBytesError impl core::cmp::PartialEq for hex_conservative::error::DecodeVariableLengthBytesError impl core::cmp::PartialEq for hex_conservative::error::InvalidCharError @@ -22,46 +25,61 @@ impl core::convert::From for hex_cons impl core::convert::From for hex_conservative::error::DecodeVariableLengthBytesError impl core::convert::From for hex_conservative::error::DecodeFixedLengthBytesError impl core::convert::From for hex_conservative::error::DecodeVariableLengthBytesError +impl core::default::Default for hex_conservative::Case +impl core::fmt::Debug for hex_conservative::Case +impl core::fmt::Debug for hex_conservative::display::DisplayByteSlice<'_> impl core::fmt::Debug for hex_conservative::error::DecodeFixedLengthBytesError impl core::fmt::Debug for hex_conservative::error::DecodeVariableLengthBytesError impl core::fmt::Debug for hex_conservative::error::InvalidCharError impl core::fmt::Debug for hex_conservative::error::InvalidLengthError impl core::fmt::Debug for hex_conservative::error::OddLengthStringError +impl core::fmt::Display for hex_conservative::display::DisplayByteSlice<'_> impl core::fmt::Display for hex_conservative::error::DecodeFixedLengthBytesError impl core::fmt::Display for hex_conservative::error::DecodeVariableLengthBytesError impl core::fmt::Display for hex_conservative::error::InvalidCharError impl core::fmt::Display for hex_conservative::error::InvalidLengthError impl core::fmt::Display for hex_conservative::error::OddLengthStringError +impl core::fmt::LowerHex for hex_conservative::display::DisplayByteSlice<'_> +impl core::fmt::UpperHex for hex_conservative::display::DisplayByteSlice<'_> +impl core::hash::Hash for hex_conservative::Case +impl core::marker::Copy for hex_conservative::Case +impl core::marker::Freeze for hex_conservative::Case impl core::marker::Freeze for hex_conservative::error::DecodeFixedLengthBytesError impl core::marker::Freeze for hex_conservative::error::DecodeVariableLengthBytesError impl core::marker::Freeze for hex_conservative::error::InvalidCharError impl core::marker::Freeze for hex_conservative::error::InvalidLengthError impl core::marker::Freeze for hex_conservative::error::OddLengthStringError +impl core::marker::Send for hex_conservative::Case impl core::marker::Send for hex_conservative::error::DecodeFixedLengthBytesError impl core::marker::Send for hex_conservative::error::DecodeVariableLengthBytesError impl core::marker::Send for hex_conservative::error::InvalidCharError impl core::marker::Send for hex_conservative::error::InvalidLengthError impl core::marker::Send for hex_conservative::error::OddLengthStringError +impl core::marker::StructuralPartialEq for hex_conservative::Case impl core::marker::StructuralPartialEq for hex_conservative::error::DecodeFixedLengthBytesError impl core::marker::StructuralPartialEq for hex_conservative::error::DecodeVariableLengthBytesError impl core::marker::StructuralPartialEq for hex_conservative::error::InvalidCharError impl core::marker::StructuralPartialEq for hex_conservative::error::InvalidLengthError impl core::marker::StructuralPartialEq for hex_conservative::error::OddLengthStringError +impl core::marker::Sync for hex_conservative::Case impl core::marker::Sync for hex_conservative::error::DecodeFixedLengthBytesError impl core::marker::Sync for hex_conservative::error::DecodeVariableLengthBytesError impl core::marker::Sync for hex_conservative::error::InvalidCharError impl core::marker::Sync for hex_conservative::error::InvalidLengthError impl core::marker::Sync for hex_conservative::error::OddLengthStringError +impl core::marker::Unpin for hex_conservative::Case impl core::marker::Unpin for hex_conservative::error::DecodeFixedLengthBytesError impl core::marker::Unpin for hex_conservative::error::DecodeVariableLengthBytesError impl core::marker::Unpin for hex_conservative::error::InvalidCharError impl core::marker::Unpin for hex_conservative::error::InvalidLengthError impl core::marker::Unpin for hex_conservative::error::OddLengthStringError +impl core::panic::unwind_safe::RefUnwindSafe for hex_conservative::Case impl core::panic::unwind_safe::RefUnwindSafe for hex_conservative::error::DecodeFixedLengthBytesError impl core::panic::unwind_safe::RefUnwindSafe for hex_conservative::error::DecodeVariableLengthBytesError impl core::panic::unwind_safe::RefUnwindSafe for hex_conservative::error::InvalidCharError impl core::panic::unwind_safe::RefUnwindSafe for hex_conservative::error::InvalidLengthError impl core::panic::unwind_safe::RefUnwindSafe for hex_conservative::error::OddLengthStringError +impl core::panic::unwind_safe::UnwindSafe for hex_conservative::Case impl core::panic::unwind_safe::UnwindSafe for hex_conservative::error::DecodeFixedLengthBytesError impl core::panic::unwind_safe::UnwindSafe for hex_conservative::error::DecodeVariableLengthBytesError impl core::panic::unwind_safe::UnwindSafe for hex_conservative::error::InvalidCharError @@ -72,11 +90,181 @@ impl hex_conservative::error::DecodeVariableLengthBytesError impl hex_conservative::error::InvalidCharError impl hex_conservative::error::InvalidLengthError impl hex_conservative::error::OddLengthStringError +impl<'a, const CAP: usize> core::marker::Freeze for hex_conservative::display::DisplayArray<'a, CAP> +impl<'a, const CAP: usize> core::marker::Send for hex_conservative::display::DisplayArray<'a, CAP> +impl<'a, const CAP: usize> core::marker::Sync for hex_conservative::display::DisplayArray<'a, CAP> +impl<'a, const CAP: usize> core::marker::Unpin for hex_conservative::display::DisplayArray<'a, CAP> +impl<'a, const CAP: usize> core::panic::unwind_safe::RefUnwindSafe for hex_conservative::display::DisplayArray<'a, CAP> +impl<'a, const CAP: usize> core::panic::unwind_safe::UnwindSafe for hex_conservative::display::DisplayArray<'a, CAP> +impl<'a> core::marker::Freeze for hex_conservative::display::DisplayByteSlice<'a> +impl<'a> core::marker::Send for hex_conservative::display::DisplayByteSlice<'a> +impl<'a> core::marker::Sync for hex_conservative::display::DisplayByteSlice<'a> +impl<'a> core::marker::Unpin for hex_conservative::display::DisplayByteSlice<'a> +impl<'a> core::panic::unwind_safe::RefUnwindSafe for hex_conservative::display::DisplayByteSlice<'a> +impl<'a> core::panic::unwind_safe::UnwindSafe for hex_conservative::display::DisplayByteSlice<'a> +impl<'a> hex_conservative::HexToBytesIter> +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 1024] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 10] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 11] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 128] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 12] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 13] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 14] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 15] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 16] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 1] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 2048] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 20] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 256] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 2] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 32] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 33] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 3] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 4096] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 4] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 512] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 5] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 64] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 65] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 6] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 7] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 8] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8; 9] +impl<'a> hex_conservative::display::DisplayHex for &'a [u8] +impl core::fmt::Debug for hex_conservative::BytesToHexIter where I: core::iter::traits::iterator::Iterator + core::fmt::Debug, ::Item: core::borrow::Borrow +impl core::fmt::Debug for hex_conservative::HexToBytesIter where I: core::iter::traits::iterator::Iterator + core::fmt::Debug +impl core::iter::traits::double_ended::DoubleEndedIterator for hex_conservative::BytesToHexIter where I: core::iter::traits::double_ended::DoubleEndedIterator, ::Item: core::borrow::Borrow +impl core::iter::traits::double_ended::DoubleEndedIterator for hex_conservative::HexToBytesIter where I: core::iter::traits::iterator::Iterator + core::iter::traits::double_ended::DoubleEndedIterator + core::iter::traits::exact_size::ExactSizeIterator +impl core::iter::traits::exact_size::ExactSizeIterator for hex_conservative::BytesToHexIter where I: core::iter::traits::exact_size::ExactSizeIterator, ::Item: core::borrow::Borrow +impl core::iter::traits::exact_size::ExactSizeIterator for hex_conservative::HexToBytesIter where I: core::iter::traits::iterator::Iterator + core::iter::traits::exact_size::ExactSizeIterator +impl core::iter::traits::iterator::Iterator for hex_conservative::BytesToHexIter where I: core::iter::traits::iterator::Iterator, ::Item: core::borrow::Borrow +impl core::iter::traits::iterator::Iterator for hex_conservative::HexToBytesIter where I: core::iter::traits::iterator::Iterator + core::iter::traits::exact_size::ExactSizeIterator +impl core::iter::traits::marker::FusedIterator for hex_conservative::BytesToHexIter where I: core::iter::traits::marker::FusedIterator, ::Item: core::borrow::Borrow +impl core::iter::traits::marker::FusedIterator for hex_conservative::HexToBytesIter where I: core::iter::traits::iterator::Iterator + core::iter::traits::exact_size::ExactSizeIterator + core::iter::traits::marker::FusedIterator +impl core::marker::Freeze for hex_conservative::BytesToHexIter where I: core::marker::Freeze +impl core::marker::Freeze for hex_conservative::HexToBytesIter where I: core::marker::Freeze +impl core::marker::Send for hex_conservative::BytesToHexIter where I: core::marker::Send +impl core::marker::Send for hex_conservative::HexToBytesIter where I: core::marker::Send +impl core::marker::Sync for hex_conservative::BytesToHexIter where I: core::marker::Sync +impl core::marker::Sync for hex_conservative::HexToBytesIter where I: core::marker::Sync +impl core::marker::Unpin for hex_conservative::BytesToHexIter where I: core::marker::Unpin +impl core::marker::Unpin for hex_conservative::HexToBytesIter where I: core::marker::Unpin +impl core::panic::unwind_safe::RefUnwindSafe for hex_conservative::BytesToHexIter where I: core::panic::unwind_safe::RefUnwindSafe +impl core::panic::unwind_safe::RefUnwindSafe for hex_conservative::HexToBytesIter where I: core::panic::unwind_safe::RefUnwindSafe +impl core::panic::unwind_safe::UnwindSafe for hex_conservative::BytesToHexIter where I: core::panic::unwind_safe::UnwindSafe +impl core::panic::unwind_safe::UnwindSafe for hex_conservative::HexToBytesIter where I: core::panic::unwind_safe::UnwindSafe +impl hex_conservative::BytesToHexIter where I: core::iter::traits::iterator::Iterator, ::Item: core::borrow::Borrow +impl hex_conservative::HexToBytesIter where I: core::iter::traits::iterator::Iterator + core::iter::traits::exact_size::ExactSizeIterator +impl core::default::Default for hex_conservative::buf_encoder::BufEncoder +impl core::fmt::Debug for hex_conservative::buf_encoder::BufEncoder +impl core::marker::Freeze for hex_conservative::buf_encoder::BufEncoder +impl core::marker::Send for hex_conservative::buf_encoder::BufEncoder +impl core::marker::Sync for hex_conservative::buf_encoder::BufEncoder +impl core::marker::Unpin for hex_conservative::buf_encoder::BufEncoder +impl core::panic::unwind_safe::RefUnwindSafe for hex_conservative::buf_encoder::BufEncoder +impl core::panic::unwind_safe::UnwindSafe for hex_conservative::buf_encoder::BufEncoder +impl hex_conservative::buf_encoder::BufEncoder +impl core::fmt::Debug for hex_conservative::display::DisplayArray<'_, LEN> +impl core::fmt::Display for hex_conservative::display::DisplayArray<'_, LEN> +impl core::fmt::LowerHex for hex_conservative::display::DisplayArray<'_, LEN> +impl core::fmt::UpperHex for hex_conservative::display::DisplayArray<'_, LEN> +pub enum hex_conservative::Case pub enum hex_conservative::DecodeFixedLengthBytesError pub enum hex_conservative::DecodeVariableLengthBytesError pub enum hex_conservative::error::DecodeFixedLengthBytesError pub enum hex_conservative::error::DecodeVariableLengthBytesError +pub fn &'a [u8; 1024]::as_hex(self) -> Self::Display +pub fn &'a [u8; 1024]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 10]::as_hex(self) -> Self::Display +pub fn &'a [u8; 10]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 11]::as_hex(self) -> Self::Display +pub fn &'a [u8; 11]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 128]::as_hex(self) -> Self::Display +pub fn &'a [u8; 128]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 12]::as_hex(self) -> Self::Display +pub fn &'a [u8; 12]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 13]::as_hex(self) -> Self::Display +pub fn &'a [u8; 13]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 14]::as_hex(self) -> Self::Display +pub fn &'a [u8; 14]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 15]::as_hex(self) -> Self::Display +pub fn &'a [u8; 15]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 16]::as_hex(self) -> Self::Display +pub fn &'a [u8; 16]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 1]::as_hex(self) -> Self::Display +pub fn &'a [u8; 1]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 2048]::as_hex(self) -> Self::Display +pub fn &'a [u8; 2048]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 20]::as_hex(self) -> Self::Display +pub fn &'a [u8; 20]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 256]::as_hex(self) -> Self::Display +pub fn &'a [u8; 256]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 2]::as_hex(self) -> Self::Display +pub fn &'a [u8; 2]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 32]::as_hex(self) -> Self::Display +pub fn &'a [u8; 32]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 33]::as_hex(self) -> Self::Display +pub fn &'a [u8; 33]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 3]::as_hex(self) -> Self::Display +pub fn &'a [u8; 3]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 4096]::as_hex(self) -> Self::Display +pub fn &'a [u8; 4096]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 4]::as_hex(self) -> Self::Display +pub fn &'a [u8; 4]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 512]::as_hex(self) -> Self::Display +pub fn &'a [u8; 512]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 5]::as_hex(self) -> Self::Display +pub fn &'a [u8; 5]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 64]::as_hex(self) -> Self::Display +pub fn &'a [u8; 64]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 65]::as_hex(self) -> Self::Display +pub fn &'a [u8; 65]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 6]::as_hex(self) -> Self::Display +pub fn &'a [u8; 6]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 7]::as_hex(self) -> Self::Display +pub fn &'a [u8; 7]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 8]::as_hex(self) -> Self::Display +pub fn &'a [u8; 8]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8; 9]::as_hex(self) -> Self::Display +pub fn &'a [u8; 9]::hex_reserve_suggestion(self) -> usize +pub fn &'a [u8]::as_hex(self) -> Self::Display +pub fn &'a [u8]::hex_reserve_suggestion(self) -> usize +pub fn hex_conservative::BytesToHexIter::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn hex_conservative::BytesToHexIter::len(&self) -> usize +pub fn hex_conservative::BytesToHexIter::new(iter: I, case: hex_conservative::Case) -> hex_conservative::BytesToHexIter +pub fn hex_conservative::BytesToHexIter::next(&mut self) -> core::option::Option +pub fn hex_conservative::BytesToHexIter::next_back(&mut self) -> core::option::Option +pub fn hex_conservative::BytesToHexIter::size_hint(&self) -> (usize, core::option::Option) +pub fn hex_conservative::Case::clone(&self) -> hex_conservative::Case +pub fn hex_conservative::Case::default() -> Self +pub fn hex_conservative::Case::eq(&self, other: &hex_conservative::Case) -> bool +pub fn hex_conservative::Case::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn hex_conservative::Case::hash<__H: core::hash::Hasher>(&self, state: &mut __H) +pub fn hex_conservative::DisplayHex::as_hex(self) -> Self::Display +pub fn hex_conservative::DisplayHex::hex_reserve_suggestion(self) -> usize +pub fn hex_conservative::HexToBytesIter::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn hex_conservative::HexToBytesIter::from_pairs(iter: I) -> Self +pub fn hex_conservative::HexToBytesIter::next(&mut self) -> core::option::Option +pub fn hex_conservative::HexToBytesIter::next_back(&mut self) -> core::option::Option +pub fn hex_conservative::HexToBytesIter::nth(&mut self, n: usize) -> core::option::Option +pub fn hex_conservative::HexToBytesIter::nth_back(&mut self, n: usize) -> core::option::Option +pub fn hex_conservative::HexToBytesIter::size_hint(&self) -> (usize, core::option::Option) +pub fn hex_conservative::HexToBytesIter>::new(s: &'a str) -> core::result::Result +pub fn hex_conservative::buf_encoder::BufEncoder::as_str(&self) -> &str +pub fn hex_conservative::buf_encoder::BufEncoder::clear(&mut self) +pub fn hex_conservative::buf_encoder::BufEncoder::default() -> Self +pub fn hex_conservative::buf_encoder::BufEncoder::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn hex_conservative::buf_encoder::BufEncoder::is_full(&self) -> bool +pub fn hex_conservative::buf_encoder::BufEncoder::new(case: hex_conservative::Case) -> Self +pub fn hex_conservative::buf_encoder::BufEncoder::put_byte(&mut self, byte: u8) +pub fn hex_conservative::buf_encoder::BufEncoder::put_bytes(&mut self, bytes: I) where I: core::iter::traits::collect::IntoIterator, ::Item: core::borrow::Borrow +pub fn hex_conservative::buf_encoder::BufEncoder::put_bytes_min<'a>(&mut self, bytes: &'a [u8]) -> &'a [u8] +pub fn hex_conservative::buf_encoder::BufEncoder::space_remaining(&self) -> usize pub fn hex_conservative::decode_to_array(hex: &str) -> core::result::Result<[u8; N], hex_conservative::error::DecodeFixedLengthBytesError> +pub fn hex_conservative::display::DisplayArray<'_, LEN>::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn hex_conservative::display::DisplayByteSlice<'_>::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn hex_conservative::display::DisplayHex::as_hex(self) -> Self::Display +pub fn hex_conservative::display::DisplayHex::hex_reserve_suggestion(self) -> usize pub fn hex_conservative::error::DecodeFixedLengthBytesError::clone(&self) -> hex_conservative::error::DecodeFixedLengthBytesError pub fn hex_conservative::error::DecodeFixedLengthBytesError::eq(&self, other: &hex_conservative::error::DecodeFixedLengthBytesError) -> bool pub fn hex_conservative::error::DecodeFixedLengthBytesError::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result @@ -108,6 +296,10 @@ pub fn hex_conservative::error::OddLengthStringError::eq(&self, other: &hex_cons pub fn hex_conservative::error::OddLengthStringError::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn hex_conservative::error::OddLengthStringError::from(never: core::convert::Infallible) -> Self pub fn hex_conservative::error::OddLengthStringError::length(&self) -> usize +pub fn hex_conservative::prelude::DisplayHex::as_hex(self) -> Self::Display +pub fn hex_conservative::prelude::DisplayHex::hex_reserve_suggestion(self) -> usize +pub hex_conservative::Case::Lower +pub hex_conservative::Case::Upper pub hex_conservative::DecodeFixedLengthBytesError::InvalidChar(hex_conservative::error::InvalidCharError) pub hex_conservative::DecodeFixedLengthBytesError::InvalidLength(hex_conservative::error::InvalidLengthError) pub hex_conservative::DecodeVariableLengthBytesError::InvalidChar(hex_conservative::error::InvalidCharError) @@ -116,8 +308,61 @@ pub hex_conservative::error::DecodeFixedLengthBytesError::InvalidChar(hex_conser pub hex_conservative::error::DecodeFixedLengthBytesError::InvalidLength(hex_conservative::error::InvalidLengthError) pub hex_conservative::error::DecodeVariableLengthBytesError::InvalidChar(hex_conservative::error::InvalidCharError) pub hex_conservative::error::DecodeVariableLengthBytesError::OddLengthString(hex_conservative::error::OddLengthStringError) +pub macro hex_conservative::display::fmt_hex_exact! +pub macro hex_conservative::display::impl_fmt_traits! +pub macro hex_conservative::fmt_hex_exact! +pub macro hex_conservative::hex! +pub macro hex_conservative::impl_fmt_traits! pub mod hex_conservative +pub mod hex_conservative::buf_encoder +pub mod hex_conservative::display pub mod hex_conservative::error +pub mod hex_conservative::prelude +pub struct hex_conservative::BytesToHexIter where I: core::iter::traits::iterator::Iterator, ::Item: core::borrow::Borrow +pub struct hex_conservative::HexToBytesIter where I: core::iter::traits::iterator::Iterator +pub struct hex_conservative::InvalidCharError +pub struct hex_conservative::InvalidLengthError +pub struct hex_conservative::OddLengthStringError +pub struct hex_conservative::buf_encoder::BufEncoder +pub struct hex_conservative::display::DisplayArray<'a, const CAP: usize> +pub struct hex_conservative::display::DisplayByteSlice<'a> pub struct hex_conservative::error::InvalidCharError pub struct hex_conservative::error::InvalidLengthError pub struct hex_conservative::error::OddLengthStringError +pub trait hex_conservative::DisplayHex: core::marker::Copy + hex_conservative::display::sealed::IsRef + hex_conservative::display::sealed::Sealed +pub trait hex_conservative::display::DisplayHex: core::marker::Copy + hex_conservative::display::sealed::IsRef + hex_conservative::display::sealed::Sealed +pub trait hex_conservative::prelude::DisplayHex: core::marker::Copy + hex_conservative::display::sealed::IsRef + hex_conservative::display::sealed::Sealed +pub type &'a [u8; 1024]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 10]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 11]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 128]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 12]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 13]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 14]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 15]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 16]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 1]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 2048]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 20]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 256]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 2]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 32]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 33]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 3]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 4096]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 4]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 512]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 5]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 64]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 65]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 6]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 7]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 8]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8; 9]::Display = hex_conservative::display::DisplayArray<'a, {$len * 2}> +pub type &'a [u8]::Display = hex_conservative::display::DisplayByteSlice<'a> +pub type hex_conservative::BytesToHexIter::Item = char +pub type hex_conservative::DisplayHex::Display: core::fmt::Display + core::fmt::Debug + core::fmt::LowerHex + core::fmt::UpperHex +pub type hex_conservative::HexSliceToBytesIter<'a> = hex_conservative::HexToBytesIter> +pub type hex_conservative::HexToBytesIter::Item = core::result::Result +pub type hex_conservative::display::DisplayHex::Display: core::fmt::Display + core::fmt::Debug + core::fmt::LowerHex + core::fmt::UpperHex +pub type hex_conservative::prelude::DisplayHex::Display: core::fmt::Display + core::fmt::Debug + core::fmt::LowerHex + core::fmt::UpperHex From d77a2cbfabdb6220dc64eb81a5af77cd10711f1b Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Thu, 5 Mar 2026 08:47:29 +1100 Subject: [PATCH 14/15] Grab changelog for 0.3 point releases As is customary we forgot to merge the point release changelog back into master for `0.3.1` and `0.3.2` - grab it now. --- CHANGELOG.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 93be9db..f8a76d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,11 @@ -# Unreleased +# 0.3.2 - 2026-01-28 - Add `hex!` macro for const hex literal parsing. +# 0.3.1 - 2025-11-24 + +- Remove `doc_auto_cfg` because it breaks the docs builds on crates.io + # 0.3.0 - 2024-09-18 - Re-implement `HexWriter` [#113](https://github.com/rust-bitcoin/hex-conservative/pull/113) From ab1122fe4064f1d15981833a858ce95c4939db09 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Thu, 5 Mar 2026 08:56:14 +1100 Subject: [PATCH 15/15] Bump version to 0.4.0 This release is the `v1.1.0` release candidate. In preparation for release add a changelog entry, bump the version number, and update the lock files. --- CHANGELOG.md | 15 +++++++++++++++ Cargo-minimal.lock | 2 +- Cargo-recent.lock | 2 +- Cargo.toml | 2 +- 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f8a76d1..2e1a58e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,18 @@ +# 0.4.0 - 2026-03-05 + +This release is the `v1.1.0` release candidate. We use 'normal' +version numbers for our RCs so that we can iterate following normal +semver rules and downstream has some chance of staying sane. + +`v1.0` of this crate only has the decoding side (and the decoding +iterator is private). + +This next release introduces the encoding side of the library and also +makes the iterators public - enjoy. There were no material changes to +the `0.3.2` release other than: + +- Align `fmt_hex_exact` and `Display` impls [#127](https://github.com/rust-bitcoin/hex-conservative/pull/127) + # 0.3.2 - 2026-01-28 - Add `hex!` macro for const hex literal parsing. diff --git a/Cargo-minimal.lock b/Cargo-minimal.lock index a2b216a..2d807e5 100644 --- a/Cargo-minimal.lock +++ b/Cargo-minimal.lock @@ -10,7 +10,7 @@ checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" [[package]] name = "hex-conservative" -version = "0.3.0" +version = "0.4.0" dependencies = [ "arrayvec", "if_rust_version", diff --git a/Cargo-recent.lock b/Cargo-recent.lock index 636f2f8..346c2c3 100644 --- a/Cargo-recent.lock +++ b/Cargo-recent.lock @@ -10,7 +10,7 @@ checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "hex-conservative" -version = "0.3.0" +version = "0.4.0" dependencies = [ "arrayvec", "if_rust_version", diff --git a/Cargo.toml b/Cargo.toml index ebba805..2860f93 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hex-conservative" -version = "0.3.0" +version = "0.4.0" authors = ["Martin Habovštiak ", "Andrew Poelstra "] license = "CC0-1.0" repository = "https://github.com/rust-bitcoin/hex-conservative"