[librsvg] Start documenting the toplevel rsvg_internals/lib.rs



commit 226b713574bc53de64630bfbe1bc0f9f8181a87a
Author: Federico Mena Quintero <federico gnome org>
Date:   Tue Oct 29 08:54:52 2019 -0600

    Start documenting the toplevel rsvg_internals/lib.rs
    
    "cargo doc --document-private-items" actually produces pretty nice
    output, if we care to document the internals.  Hopefully this should
    make the library sources easier to explore.

 rsvg_internals/src/lib.rs | 36 +++++++++++++++++++++++++++++++++++-
 1 file changed, 35 insertions(+), 1 deletion(-)
---
diff --git a/rsvg_internals/src/lib.rs b/rsvg_internals/src/lib.rs
index 6e873ef0..2a83abf0 100644
--- a/rsvg_internals/src/lib.rs
+++ b/rsvg_internals/src/lib.rs
@@ -1,8 +1,42 @@
+//! # The implementation of librsvg
+//!
+//! The implementation of librsvg is in the `rsvg_internals` crate.  It is not a public
+//! crate; instead, it exports the primitives necessary to implement librsvg's public APIs,
+//! both the C and Rust APIs.  It has the XML and CSS parsing code, the SVG element
+//! definitions and tree of elements, and all the drawing logic.
+//!
+//! Some interesting parts of rsvg_internals:
+//!
+//! * [The `Handle` struct](handle/struct.Handle.html) provides the primitives to implement
+//! the public APIs, such as loading an SVG file and rendering it.
+//!
+//! * [The `DrawingCtx` struct](drawing_ctx/struct.DrawingCtx.html) is active while an SVG
+//! handle is being drawn or queried for its geometry.  It has all the mutable state related
+//! to the drawing process.
+//!
+//! * [The `Document` struct][document/struct.Document.html] represents a loaded SVG
+//! document.  It holds the tree of [`RsvgNode`] elements, and a mapping of `id` attributes
+//! to the corresponding element nodes.
+//!
+//! * [The `node` module](node/index.html) provides the [`RsvgNode`] struct and
+//! [`NodeTrait`], which form the basis for the tree of SVG elements.
+//!
+//! * [The `xml` module](xml/index.html) receives events from the XML parser, and builds a
+//! [`Document`] as a tree of [`RsvgNode`].
+//!
+//! * [The `properties` module](properties/index.html) contains structs that represent
+//! collections of CSS properties.
+//!
+//! * [The `property_defs` module](property_defs/index.html) contains one type for each of
+//! the CSS style properties that librsvg supports.
+//!
+//! [`RsvgNode`]: node/type.RsvgNode.html
+//! [`NodeTrait`]: node/trait.NodeTrait.html
+
 #![allow(clippy::clone_on_ref_ptr)]
 #![allow(clippy::not_unsafe_ptr_arg_deref)]
 #![allow(clippy::too_many_arguments)]
 #![warn(unused)]
-
 use ::xml as xml_rs;
 
 pub use crate::color::{rsvg_css_parse_color, ColorKind, ColorSpec};


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]