Crate sdml_generate
source ·Expand description
This package provides a set of generators, or transformations, from the in-memory model to either other representations as well as actions that can be performed on modules.
This package also provides a pair of traits used to define generators, types that convert one or more modules into other artifacts.
§Example
The following shows common usage of the GenerateToWriter
trait in this case to write a text-tree representation of a
modules transitive dependencies.
use sdml_core::store::InMemoryModuleCache;
use sdml_core::model::modules::Module;
use sdml_generate::Generator;
use sdml_generate::actions::deps::{
DependencyViewGenerator, DependencyViewOptions,
};
use std::io::stdout;
let (module, cache) = load_module();
let mut generator = DependencyViewGenerator::default();
let options = DependencyViewOptions::default().as_text_tree();
generator.generate_with_options(&module, &cache, options, None, &mut stdout())
.expect("write to stdout failed");
Modules§
- This module provides a set of actions that can be performed on an SDML file.
- This module provides syntax coloring support for SDML and RDF.
- This module provides the generators for module-to-file conversion which includes documentation, RDF, and s-expressions.
- This module provides the generators for concept, entity-relationship, and UML class diagrams. It also provides a common
OutputFormat
type that describes the image format.
Traits§
- This trait denotes a type that generates content from a module.