init: archlens — architecture diagram generator
Some checks failed
CI / Check / Test (push) Failing after 1m24s
Some checks failed
CI / Check / Test (push) Failing after 1m24s
Hex arch + DDD, tree-sitter parsing, Mermaid/ASCII output. Supports Rust + Python. 92 tests. CI, diff, --check for staleness detection.
This commit is contained in:
3
crates/adapters/stdout-writer/src/lib.rs
Normal file
3
crates/adapters/stdout-writer/src/lib.rs
Normal file
@@ -0,0 +1,3 @@
|
||||
mod stdout_output_writer;
|
||||
|
||||
pub use stdout_output_writer::StdoutOutputWriter;
|
||||
24
crates/adapters/stdout-writer/src/stdout_output_writer.rs
Normal file
24
crates/adapters/stdout-writer/src/stdout_output_writer.rs
Normal file
@@ -0,0 +1,24 @@
|
||||
use archlens_domain::{DomainError, RenderOutput, ports::OutputWriter};
|
||||
|
||||
pub struct StdoutOutputWriter;
|
||||
|
||||
impl Default for StdoutOutputWriter {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl StdoutOutputWriter {
|
||||
pub fn new() -> Self {
|
||||
Self
|
||||
}
|
||||
}
|
||||
|
||||
impl OutputWriter for StdoutOutputWriter {
|
||||
fn write(&self, output: &RenderOutput) -> Result<(), DomainError> {
|
||||
for file in output.files() {
|
||||
println!("{}", file.content());
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user