pub struct InspectBytes<T: AsRef<[u8]>>(pub T);Expand description
Wrapper to log bytes in an inspect_log! or inspect_insert! macro.
This wrapper is defined because a default WriteInspect implementation isn’t provided for
an array or slice of bytes. Such default implementation was left out so that the user has
to explicitly choose whether to log bytes slice as a string or a byte vector in Inspect.
Tuple Fields§
§0: TTrait Implementations§
Source§impl<T: AsRef<[u8]>> WriteInspect for InspectBytes<T>
impl<T: AsRef<[u8]>> WriteInspect for InspectBytes<T>
Auto Trait Implementations§
impl<T> Freeze for InspectBytes<T>where
T: Freeze,
impl<T> RefUnwindSafe for InspectBytes<T>where
T: RefUnwindSafe,
impl<T> Send for InspectBytes<T>where
T: Send,
impl<T> Sync for InspectBytes<T>where
T: Sync,
impl<T> Unpin for InspectBytes<T>where
T: Unpin,
impl<T> UnwindSafe for InspectBytes<T>where
T: UnwindSafe,
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
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more