2024-11-08 10:23:02 +01:00
|
|
|
macro_rules! fmt_impl {
|
|
|
|
|
($tr:ident, $ty:ty) => {
|
|
|
|
|
impl $tr for $ty {
|
|
|
|
|
fn fmt(&self, f: &mut Formatter<'_>) -> Result {
|
|
|
|
|
$tr::fmt(&BytesRef(self.as_ref()), f)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
2020-01-24 02:08:40 +08:00
|
|
|
mod debug;
|
|
|
|
|
mod hex;
|
|
|
|
|
|
|
|
|
|
/// `BytesRef` is not a part of public API of bytes crate.
|
|
|
|
|
struct BytesRef<'a>(&'a [u8]);
|