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
Print everything on one line.
sourcepub fn with_semi(&mut self) -> &mut PrinterContext
pub fn with_semi(&mut self) -> &mut PrinterContext
Add a semicolon 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 separator.
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 the max line length.
The default value is 90.
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