File tree Expand file tree Collapse file tree 3 files changed +11
-9
lines changed Expand file tree Collapse file tree 3 files changed +11
-9
lines changed Original file line number Diff line number Diff line change 8
8
This crate provides a fast conversion of byte arrays to hexadecimal strings,
9
9
both at compile time, and at run time.
10
10
11
- Extends the [ ` hex ` ] crate's implementation with [ const-eval] , a
12
- [ const-generics formatting buffer] [ buffer ] , similar to [ ` itoa ` ] 's, and more.
11
+ It aims to be a drop-in replacement for the [ ` hex ` ] crate, as well as extending
12
+ the API with [ const-eval] , a [ const-generics formatting buffer] [ buffer ] , similar
13
+ to [ ` itoa ` ] 's, and more.
13
14
14
15
_ Version requirement: rustc 1.64+_
15
16
Original file line number Diff line number Diff line change 7
7
//! This crate provides a fast conversion of byte arrays to hexadecimal strings,
8
8
//! both at compile time, and at run time.
9
9
//!
10
- //! Extends the [`hex`] crate's implementation with [const-eval](const_encode), a
10
+ //! It aims to be a drop-in replacement for the [`hex`] crate, as well as
11
+ //! extending the API with [const-eval](const_encode), a
11
12
//! [const-generics formatting buffer](Buffer), similar to [`itoa`]'s, and more.
12
13
//!
13
14
//! _Version requirement: rustc 1.64+_
14
15
//!
15
16
//! [`itoa`]: https://docs.rs/itoa/latest/itoa/struct.Buffer.html
16
- #![ cfg_attr( not( feature = "hex" ) , doc = "[`hex`]: https://docs.rs/hex" ) ]
17
+ //! [`hex`]: https://docs.rs/hex
18
+
17
19
#![ cfg_attr( not( feature = "std" ) , no_std) ]
18
20
#![ cfg_attr( docsrs, feature( doc_cfg, doc_auto_cfg) ) ]
19
21
#![ cfg_attr(
Original file line number Diff line number Diff line change @@ -19,8 +19,6 @@ use alloc::{
19
19
/// This trait is implemented for all `T` which implement `AsRef<[u8]>`. This
20
20
/// includes `String`, `str`, `Vec<u8>` and `[u8]`.
21
21
///
22
- /// *Note*: instead of using this trait, you might want to use [`encode`](crate::encode) or [`ToHexExt`].
23
- ///
24
22
/// # Examples
25
23
///
26
24
/// ```
@@ -32,7 +30,7 @@ use alloc::{
32
30
/// ```
33
31
#[ cfg_attr( feature = "alloc" , doc = "\n [`encode`]: crate::encode" ) ]
34
32
#[ cfg_attr( not( feature = "alloc" ) , doc = "\n [`encode`]: crate::encode_to_slice" ) ]
35
- #[ deprecated( note = "use `encode` or other specialized functions instead" ) ]
33
+ #[ deprecated( note = "use `ToHexExt` instead" ) ]
36
34
pub trait ToHex {
37
35
/// Encode the hex strict representing `self` into the result.
38
36
/// Lower case letters are used (e.g. `f9b4ca`).
@@ -43,9 +41,10 @@ pub trait ToHex {
43
41
fn encode_hex_upper < T : iter:: FromIterator < char > > ( & self ) -> T ;
44
42
}
45
43
46
- /// Encoding values as hex string with prefix `0x` .
44
+ /// Encoding values as hex string.
47
45
///
48
- /// This trait is implemented for all `T` which implement `AsRef<[u8]>`.
46
+ /// This trait is implemented for all `T` which implement `AsRef<[u8]>`. This
47
+ /// includes `String`, `str`, `Vec<u8>` and `[u8]`.
49
48
///
50
49
/// # Examples
51
50
///
You can’t perform that action at this time.
0 commit comments