diff options
author | seancarroll <seanc28@gmail.com> | 2021-01-10 21:09:57 -0600 |
---|---|---|
committer | seancarroll <seanc28@gmail.com> | 2021-01-10 21:09:57 -0600 |
commit | 499713a1d63564be320030dc98b3879b66390bb8 (patch) | |
tree | d064f1b6fd8615d5d44354774c88ec3396e0f017 | |
parent | 97fe1b73ee60eb85f93f391d4aafe90fa4d1c02b (diff) | |
download | dotavious-499713a1d63564be320030dc98b3879b66390bb8.zip |
improve rust docs
-rw-r--r-- | src/lib.rs | 36 |
1 files changed, 28 insertions, 8 deletions
@@ -3,18 +3,16 @@ //! Dotavious provides bindings to generate [DOT](https://graphviz.org/doc/info/lang.html) //! code used by the Graphviz (http://graphviz.org/) for visualising graphs. +//! Provides strongly typed attribute functions and offers almost complete +//! coverage of all Graphviz attributes and syntax //! -//! Main features of the graphviz library include: -//! * Almost complete coverage of all Graphviz attributes and syntax. +//! # Examples //! -//! # Example +//! First example provides a basic directed graph: +//! 2 nodes connected by a single edge //! //! ```rust -//! use dotavious::attributes::{AttributeText, GraphAttributeStatementBuilder, GraphAttributes}; -//! use dotavious::{ -//! Dot, Edge, EdgeAttributeStatementBuilder, EdgeAttributes, EdgeBuilder, Graph, -//! GraphBuilder, Node, NodeAttributeStatementBuilder, NodeAttributes, NodeBuilder, -//! }; +//! use dotavious::{Dot, Edge, Graph, GraphBuilder, Node}; //! use std::io; //! use std::io::Read; //! @@ -41,6 +39,28 @@ //! N0 -> N1; //! } //! ``` +//! +//! Second example provides a more complex graph showcasing +//! Dotavious' various builders and strongly typed attribute +//! functions. +//! +//! ```rust +//! use dotavious::attributes::{ +//! AttributeText, Color, CompassPoint, EdgeStyle, GraphAttributeStatementBuilder, +//! GraphAttributes, NodeStyle, PortPosition, RankDir, Shape, +//! }; +//! use dotavious::{ +//! Dot, Edge, EdgeAttributeStatementBuilder, EdgeAttributes, EdgeBuilder, Graph, +//! GraphBuilder, Node, NodeAttributeStatementBuilder, NodeAttributes, NodeBuilder, +//! }; +//! use std::io; +//! use std::io::Read; +//! ``` +//! +//! Produces +//! ```dot +//! +//! ``` pub mod attributes; pub mod dot; |