pub struct JSONPrinter { /* private fields */ }
Implementations§
Source§impl JSONPrinter
impl JSONPrinter
pub fn new(json_enabled: bool, output_channel: OutputChannel) -> JSONPrinter
pub fn json_enabled(&self) -> bool
pub fn output_channel(&self) -> OutputChannel
pub fn set_output_channel(&mut self, output_channel: OutputChannel)
pub fn first_item(&self) -> bool
pub fn print_open_bracket(&self, name: Option<&str>, bracket_type: BracketType)
pub fn write_open_bracket( &self, f: &mut Formatter<'_>, name: Option<&str>, bracket_type: BracketType, ) -> Result
pub fn print_close_bracket(&self)
pub fn write_close_bracket(&self, f: &mut Formatter<'_>) -> Result
pub fn print_maybe_json(&self, force_quotes: bool, msg: &str)
pub fn write_maybe_json( &self, f: &mut Formatter<'_>, force_quotes: bool, msg: &str, ) -> Result
Trait Implementations§
Source§impl Clone for JSONPrinter
impl Clone for JSONPrinter
Auto Trait Implementations§
impl !Freeze for JSONPrinter
impl RefUnwindSafe for JSONPrinter
impl Send for JSONPrinter
impl Sync for JSONPrinter
impl Unpin for JSONPrinter
impl UnwindSafe for JSONPrinter
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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