Struct rustc_ast_pretty::pp::Printer [−][src]
pub struct Printer {
out: String,
buf_max_len: usize,
margin: isize,
space: isize,
left: usize,
right: usize,
buf: Vec<BufEntry>,
left_total: isize,
right_total: isize,
scan_stack: VecDeque<usize>,
print_stack: Vec<PrintStackElem>,
pending_indentation: isize,
}
Fields
out: String
buf_max_len: usize
margin: isize
Width of lines we’re constrained to
space: isize
Number of spaces left on line
left: usize
Index of left side of input stream
right: usize
Index of right side of input stream
buf: Vec<BufEntry>
Ring-buffer of tokens and calculated sizes
left_total: isize
Running size of stream “…left”
right_total: isize
Running size of stream “…right”
scan_stack: VecDeque<usize>
Pseudo-stack, really a ring too. Holds the primary-ring-buffers index of the Begin that started the current block, possibly with the most recent Break after that Begin (if there is any) on top of it. Stuff is flushed off the bottom as it becomes irrelevant due to the primary ring-buffer advancing.
print_stack: Vec<PrintStackElem>
Stack of blocks-in-progress being flushed by print
pending_indentation: isize
Buffered indentation to avoid writing trailing whitespace
Implementations
Be very careful with this!
Auto Trait Implementations
impl RefUnwindSafe for Printer
impl UnwindSafe for Printer
Blanket Implementations
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 168 bytes