bytes/fmt/mod.rs
1macro_rules! fmt_impl {
2 ($tr:ident, $ty:ty) => {
3 impl $tr for $ty {
4 fn fmt(&self, f: &mut Formatter<'_>) -> Result {
5 $tr::fmt(&BytesRef(self.as_ref()), f)
6 }
7 }
8 };
9}
10
11mod debug;
12mod hex;
13
14/// `BytesRef` is not a part of public API of bytes crate.
15struct BytesRef<'a>(&'a [u8]);