pub trait DotPrinter {
    // Required method
    fn print(&self, ctx: &mut PrinterContext) -> String;
}
Expand description

The trait for serailizing a Graph into the graphviz DOT language:

§Example:

       use dot_generator::*;
       use dot_structures::*;
       use self::graphviz_rust::printer::PrinterContext;
       use self::graphviz_rust::printer::DotPrinter;

       let mut ctx =PrinterContext::default();
       ctx.always_inline();
       ctx.with_indent_step(4);
       let graph = graph!(strict di id!("t"));

       let string = graph.print(&mut ctx);

Required Methods§

source

fn print(&self, ctx: &mut PrinterContext) -> String

Implementations on Foreign Types§

source§

impl DotPrinter for Graph

source§

fn print(&self, ctx: &mut PrinterContext) -> String

source§

impl DotPrinter for GraphAttributes

source§

fn print(&self, ctx: &mut PrinterContext) -> String

source§

impl DotPrinter for Id

source§

fn print(&self, _ctx: &mut PrinterContext) -> String

source§

impl DotPrinter for Stmt

source§

fn print(&self, ctx: &mut PrinterContext) -> String

source§

impl DotPrinter for Vertex

source§

fn print(&self, ctx: &mut PrinterContext) -> String

source§

impl DotPrinter for Vec<Stmt>

source§

fn print(&self, ctx: &mut PrinterContext) -> String

source§

impl DotPrinter for Vec<Attribute>

source§

fn print(&self, ctx: &mut PrinterContext) -> String

source§

impl DotPrinter for Attribute

source§

fn print(&self, ctx: &mut PrinterContext) -> String

source§

impl DotPrinter for Edge

source§

fn print(&self, ctx: &mut PrinterContext) -> String

source§

impl DotPrinter for Node

source§

fn print(&self, ctx: &mut PrinterContext) -> String

source§

impl DotPrinter for NodeId

source§

fn print(&self, ctx: &mut PrinterContext) -> String

source§

impl DotPrinter for Port

source§

fn print(&self, ctx: &mut PrinterContext) -> String

source§

impl DotPrinter for Subgraph

source§

fn print(&self, ctx: &mut PrinterContext) -> String

Implementors§