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::cache::ModuleCache;
use sdml_core::model::modules::Module;
use sdml_generate::GenerateToWriter;
use sdml_generate::actions::deps::{
DependencyViewRepresentation, DependencyViewGenerator,
};
use std::io::stdout;
let (module, cache) = load_module();
let view = DependencyViewRepresentation::TextTree;
let mut generator = DependencyViewGenerator::default();
generator.write_in_format(&module, &cache, &mut stdout(), view)
.expect("write to stdout failed");
Modules§
- This module provides a set of actions that can be performed on an SDML file.
- 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.
Structs§
- A type that may be used when no format options are required by a generator implementation.
Traits§
- This trait denotes a generator that writes to a file path.
- This trait denotes a generator that writes to an implementation of Write.