render_svg_from_dot

Function render_svg_from_dot 

Source
pub fn render_svg_from_dot(dot: &str) -> Result<impl Read, YumlError>
Expand description

Render SVG using the “dot” binary, taking a valid dot-description as input. Usage:

use std::fs::read_to_string;
use yuml_rs::{parse_yuml, render_svg_from_dot};

let yuml = read_to_string("activity.yaml").expect("can not read input file");
let dot = parse_yuml(&yuml).expect("invalid yUML");
render_svg_from_dot(&dot.to_string()).expect("can not generate SVG");

§Panics

Panics when the “dot” binary is not installed, or when the dot input is invalid.