pub struct Str<T>(pub T);Expand description
Wrapper for slice of bytes with printing the bytes as a string.
§Examples
let s = format!("{}", Str(b"\xff\talex\n"));
assert_eq!(s, "\\xff\\talex\\n");Tuple Fields§
§0: TTrait Implementations§
impl<T: Copy> Copy for Str<T>
impl<T: Eq> Eq for Str<T>
impl<T> StructuralPartialEq for Str<T>
Auto Trait Implementations§
impl<T> Freeze for Str<T>where
T: Freeze,
impl<T> RefUnwindSafe for Str<T>where
T: RefUnwindSafe,
impl<T> Send for Str<T>where
T: Send,
impl<T> Sync for Str<T>where
T: Sync,
impl<T> Unpin for Str<T>where
T: Unpin,
impl<T> UnwindSafe for Str<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