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
pub fn new( semi: bool, indent_step: usize, line_s: String, inline_size: usize ) -> Self
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for PrinterContext
impl Send for PrinterContext
impl Sync for PrinterContext
impl Unpin for PrinterContext
impl UnwindSafe for PrinterContext
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