Struct graphviz_rust::printer::PrinterContext
source · pub struct PrinterContext { /* private fields */ }
Expand description
Context allows to customize the output of the file.
Example:
fn ctx() {
use self::graphviz_rust::printer::PrinterContext;
let mut ctx = PrinterContext::default();
ctx.always_inline();
ctx.with_indent_step(4);
}
Implementations§
source§impl PrinterContext
impl PrinterContext
sourcepub fn always_inline(&mut self) -> &mut PrinterContext
pub fn always_inline(&mut self) -> &mut PrinterContext
everything in one line
sourcepub fn with_semi(&mut self) -> &mut PrinterContext
pub fn with_semi(&mut self) -> &mut PrinterContext
add semi at the end of every line
sourcepub fn with_indent_step(&mut self, step: usize) -> &mut PrinterContext
pub fn with_indent_step(&mut self, step: usize) -> &mut PrinterContext
set a step of the indent
sourcepub fn with_line_sep(&mut self, sep: String) -> &mut PrinterContext
pub fn with_line_sep(&mut self, sep: String) -> &mut PrinterContext
set a specific line sep
sourcepub fn with_inline_size(&mut self, inline_s: usize) -> &mut PrinterContext
pub fn with_inline_size(&mut self, inline_s: usize) -> &mut PrinterContext
set a line len enough to fit in a line