summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib.rs36
1 files changed, 28 insertions, 8 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 575e4cf..2b64b9d 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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;