Struct fmt_extra::AsciiStr
[−]
[src]
pub struct AsciiStr<T>(pub T);
A wrapper around anything that dereferences to a byte slice ([u8]
) that displays it's
contents as a string using rust-like (& c-like) escapes for non ascii characters
The entire thing is wrapped in double quotes (") and any interior double quotes are escaped as '"'
Trait Implementations
impl<T: Clone> Clone for AsciiStr<T>
[src]
fn clone(&self) -> AsciiStr<T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<T: PartialEq> PartialEq for AsciiStr<T>
[src]
fn eq(&self, __arg_0: &AsciiStr<T>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &AsciiStr<T>) -> bool
This method tests for !=
.
impl<T: Eq> Eq for AsciiStr<T>
[src]
impl<T: AsRef<[u8]>> Display for AsciiStr<T>
[src]
fn fmt(&self, fmt: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl<T: AsRef<[u8]>> Debug for AsciiStr<T>
[src]
fn fmt(&self, fmt: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter.
impl<T> Deref for AsciiStr<T>
[src]
type Target = T
The resulting type after dereferencing
fn deref(&self) -> &Self::Target
The method called to dereference a value