[−][src]Trait colored_json::ToColoredJson
Trait to add json coloring for all AsRef<str>
like String
and &str
Required methods
fn to_colored_json_auto(&self) -> Result<String>
fn to_colored_json(&self, mode: ColorMode) -> Result<String>
fn to_colored_json_with_styler(
&self,
mode: ColorMode,
styler: Styler
) -> Result<String>
&self,
mode: ColorMode,
styler: Styler
) -> Result<String>
fn write_colored_json<W>(&self, writer: &mut W) -> Result<()> where
W: Write,
W: Write,
fn write_colored_json_with_mode<W>(
&self,
writer: &mut W,
mode: ColorMode
) -> Result<()> where
W: Write,
&self,
writer: &mut W,
mode: ColorMode
) -> Result<()> where
W: Write,
fn write_colored_json_with_styler<W>(
&self,
writer: &mut W,
mode: ColorMode,
styler: Styler
) -> Result<()> where
W: Write,
&self,
writer: &mut W,
mode: ColorMode,
styler: Styler
) -> Result<()> where
W: Write,
Implementors
impl<S: ?Sized> ToColoredJson for S where
S: AsRef<str>,
[src]
S: AsRef<str>,
fn to_colored_json_auto(&self) -> Result<String>
[src]
Serialize the given data structure as a pretty-color-printed String of JSON.
Errors
Serialization can fail if T
's implementation of Serialize
decides to
fail, or if T
contains a map with non-string keys.
fn to_colored_json(&self, mode: ColorMode) -> Result<String>
[src]
Serialize the given data structure as a pretty-color-printed String of JSON.
Errors
Serialization can fail if T
's implementation of Serialize
decides to
fail, or if T
contains a map with non-string keys.
fn to_colored_json_with_styler(
&self,
mode: ColorMode,
styler: Styler
) -> Result<String>
[src]
&self,
mode: ColorMode,
styler: Styler
) -> Result<String>
Serialize the given data structure as a pretty-color-printed String of JSON.
Errors
Serialization can fail if T
's implementation of Serialize
decides to
fail, or if T
contains a map with non-string keys.
fn write_colored_json<W>(&self, writer: &mut W) -> Result<()> where
W: Write,
[src]
W: Write,
Serialize the given data structure as pretty-color-printed JSON into the IO stream.
Errors
Serialization can fail if T
's implementation of Serialize
decides to
fail, or if T
contains a map with non-string keys.
fn write_colored_json_with_mode<W>(
&self,
writer: &mut W,
mode: ColorMode
) -> Result<()> where
W: Write,
[src]
&self,
writer: &mut W,
mode: ColorMode
) -> Result<()> where
W: Write,
fn write_colored_json_with_styler<W>(
&self,
writer: &mut W,
mode: ColorMode,
styler: Styler
) -> Result<()> where
W: Write,
[src]
&self,
writer: &mut W,
mode: ColorMode,
styler: Styler
) -> Result<()> where
W: Write,