mirror of
https://github.com/tokio-rs/bytes.git
synced 2026-08-11 00:00:23 +02:00
16 lines
340 B
Rust
16 lines
340 B
Rust
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)
|
|
}
|
|
}
|
|
};
|
|
}
|
|
|
|
mod debug;
|
|
mod hex;
|
|
|
|
/// `BytesRef` is not a part of public API of bytes crate.
|
|
struct BytesRef<'a>(&'a [u8]);
|