1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
//! Export functionality for Orrery diagrams.
//!
//! This module provides the [`Exporter`] trait that defines the interface for
//! converting laid-out diagrams into output formats. It is the final stage in
//! the Orrery processing pipeline.
//!
//! # Pipeline Position
//!
//! ```text
//! Source Text
//! ↓ parse
//! Semantic Model
//! ↓ structure
//! Hierarchy Graph
//! ↓ layout
//! Positioned Elements (LayeredLayout)
//! ↓ export (this module)
//! Output File
//! ```
//!
//! # Available Backends
//!
//! - [`svg`] — SVG output via [`svg::SvgBuilder`] and [`svg::Svg`]
//!
//! # Error Handling
//!
//! Export operations return [`Error`], covering rendering failures and I/O
//! errors. [`Error`] converts into [`RenderError::Export`] at the crate
//! boundary.
//!
//! [`RenderError::Export`]: crate::RenderError::Export
/// SVG export backend.
use crateLayeredLayout;
/// Abstraction for diagram export backends.
///
/// Implementors convert a [`LayeredLayout`] into a specific output format
/// (e.g., SVG).
///
/// See the [`svg`] module for the built-in SVG implementation.
/// Errors that can occur during diagram export.
///
/// This type is converted into [`RenderError::Export`] at the crate
/// boundary via the [`From`] implementation in [`crate::error`].
///
/// [`RenderError::Export`]: crate::RenderError::Export