rto_render/lib.rs
1//! Renderers over the Roteiro graph. All outputs — docs site, Obsidian vault,
2//! and the optional MCP server (feature `mcp`) — are build products of the
3//! same store, so humans and agents always see the same data.
4
5/// A render target for the graph.
6#[derive(Debug, Clone, Copy, PartialEq, Eq)]
7pub enum Target {
8 /// Static documentation website (ADRs, blueprints, AI context pages).
9 DocsSite,
10 /// Obsidian-compatible markdown vault.
11 ObsidianVault,
12}
13
14impl Target {
15 /// Stable CLI name for this target.
16 #[must_use]
17 pub fn as_str(self) -> &'static str {
18 match self {
19 Self::DocsSite => "docs",
20 Self::ObsidianVault => "obsidian",
21 }
22 }
23}
24
25#[cfg(test)]
26mod tests {
27 use super::Target;
28
29 #[test]
30 fn target_names_are_stable() {
31 assert_eq!(Target::DocsSite.as_str(), "docs");
32 assert_eq!(Target::ObsidianVault.as_str(), "obsidian");
33 }
34}