pub(crate) struct BsDebug<'a>(pub(crate) &'a [u8]);
Expand description
Alternative implementation of fmt::Debug
for byte slice.
Standard Debug
implementation for [u8]
is comma separated
list of numbers. Since large amount of byte strings are in fact
ASCII strings or contain a lot of ASCII strings (e. g. HTTP),
it is convenient to print strings as ASCII when possible.
This struct wraps &[u8]
just to override fmt::Debug
.
BsDebug
is not a part of public API of bytes crate.
Tuple Fields§
§0: &'a [u8]
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for BsDebug<'a>
impl<'a> RefUnwindSafe for BsDebug<'a>
impl<'a> Send for BsDebug<'a>
impl<'a> Sync for BsDebug<'a>
impl<'a> Unpin for BsDebug<'a>
impl<'a> UnwindSafe for BsDebug<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more