pub struct Printer<'v> {
pub buf: String,
pub indent: i32,
pub space: bool,
pub vp: Option<ValuePrinter<'v>>,
}Fields§
§buf: String§indent: i32§space: bool§vp: Option<ValuePrinter<'v>>Implementations§
Source§impl<'v> Printer<'v>
impl<'v> Printer<'v>
pub fn new() -> Self
pub fn write_fmt(&mut self, fmt: Arguments<'_>)
pub fn newline(&mut self)
pub fn indent(&mut self, diff: i32)
pub fn print_unescaped_str(&mut self, s: &str)
pub fn print<T: Print>(&mut self, item: &'v T)
pub fn print_value(&mut self, vid: ValueId)
pub fn print_list<'r: 'v, T: Print + 'r>( &mut self, kw: &str, left: &str, sep: &str, right: &str, newline: bool, last: bool, list: impl 'r + IntoIterator<Item = &'r T>, )
pub fn print_list_tuple<'r: 'v, K: Print + 'r, D: Print + 'r>( &mut self, kw: &str, left: &str, sep: &str, right: &str, newline: bool, last: bool, list: impl 'r + IntoIterator<Item = (&'r K, &'r D)>, )
pub fn set_printer( &mut self, printer: Option<ValuePrinter<'v>>, ) -> Option<ValuePrinter<'v>>
Auto Trait Implementations§
impl<'v> Freeze for Printer<'v>
impl<'v> RefUnwindSafe for Printer<'v>
impl<'v> Send for Printer<'v>
impl<'v> Sync for Printer<'v>
impl<'v> Unpin for Printer<'v>
impl<'v> UnwindSafe for Printer<'v>
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