pub struct GraphRenderer;Expand description
Dispatches every output format from the same completed snapshot.
Implementations§
Source§impl GraphRenderer
impl GraphRenderer
Sourcepub fn render(
snapshot: &GraphReportSnapshot,
format: GraphReportFormat,
) -> String
pub fn render( snapshot: &GraphReportSnapshot, format: GraphReportFormat, ) -> String
Renders snapshot as format.
Sourcepub fn to_dot(snapshot: &GraphReportSnapshot) -> String
pub fn to_dot(snapshot: &GraphReportSnapshot) -> String
Renders Graphviz DOT.
Sourcepub fn to_mermaid(snapshot: &GraphReportSnapshot) -> String
pub fn to_mermaid(snapshot: &GraphReportSnapshot) -> String
Renders Mermaid flowchart source.
Sourcepub fn to_d2(snapshot: &GraphReportSnapshot) -> String
pub fn to_d2(snapshot: &GraphReportSnapshot) -> String
Renders D2 diagram source.
Sourcepub fn to_csv(snapshot: &GraphReportSnapshot) -> String
pub fn to_csv(snapshot: &GraphReportSnapshot) -> String
Renders aggregated dependency CSV.
Sourcepub fn to_json(snapshot: &GraphReportSnapshot) -> String
pub fn to_json(snapshot: &GraphReportSnapshot) -> String
Renders complete snapshot JSON.
Sourcepub fn to_html(snapshot: &GraphReportSnapshot) -> String
pub fn to_html(snapshot: &GraphReportSnapshot) -> String
Renders a self-contained offline HTML report.
Sourcepub fn export(
snapshot: &GraphReportSnapshot,
format: GraphReportFormat,
output_path: impl AsRef<Path>,
) -> Result<(), ArchUnitError>
pub fn export( snapshot: &GraphReportSnapshot, format: GraphReportFormat, output_path: impl AsRef<Path>, ) -> Result<(), ArchUnitError>
Renders snapshot as format and writes it as UTF-8.
Sourcepub fn export_as_dot(
snapshot: &GraphReportSnapshot,
output_path: impl AsRef<Path>,
) -> Result<(), ArchUnitError>
pub fn export_as_dot( snapshot: &GraphReportSnapshot, output_path: impl AsRef<Path>, ) -> Result<(), ArchUnitError>
Exports Graphviz DOT as UTF-8.
Sourcepub fn export_as_mermaid(
snapshot: &GraphReportSnapshot,
output_path: impl AsRef<Path>,
) -> Result<(), ArchUnitError>
pub fn export_as_mermaid( snapshot: &GraphReportSnapshot, output_path: impl AsRef<Path>, ) -> Result<(), ArchUnitError>
Exports Mermaid flowchart source as UTF-8.
Sourcepub fn export_as_d2(
snapshot: &GraphReportSnapshot,
output_path: impl AsRef<Path>,
) -> Result<(), ArchUnitError>
pub fn export_as_d2( snapshot: &GraphReportSnapshot, output_path: impl AsRef<Path>, ) -> Result<(), ArchUnitError>
Exports D2 diagram source as UTF-8.
Sourcepub fn export_as_csv(
snapshot: &GraphReportSnapshot,
output_path: impl AsRef<Path>,
) -> Result<(), ArchUnitError>
pub fn export_as_csv( snapshot: &GraphReportSnapshot, output_path: impl AsRef<Path>, ) -> Result<(), ArchUnitError>
Exports aggregated dependency CSV as UTF-8.
Sourcepub fn export_as_json(
snapshot: &GraphReportSnapshot,
output_path: impl AsRef<Path>,
) -> Result<(), ArchUnitError>
pub fn export_as_json( snapshot: &GraphReportSnapshot, output_path: impl AsRef<Path>, ) -> Result<(), ArchUnitError>
Exports complete snapshot JSON as UTF-8.
Sourcepub fn export_as_html(
snapshot: &GraphReportSnapshot,
output_path: impl AsRef<Path>,
) -> Result<(), ArchUnitError>
pub fn export_as_html( snapshot: &GraphReportSnapshot, output_path: impl AsRef<Path>, ) -> Result<(), ArchUnitError>
Exports a self-contained offline HTML report as UTF-8.
Trait Implementations§
Source§impl Clone for GraphRenderer
impl Clone for GraphRenderer
Source§fn clone(&self) -> GraphRenderer
fn clone(&self) -> GraphRenderer
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GraphRenderer
impl Debug for GraphRenderer
Source§impl Default for GraphRenderer
impl Default for GraphRenderer
Source§fn default() -> GraphRenderer
fn default() -> GraphRenderer
Returns the “default value” for a type. Read more
impl Copy for GraphRenderer
Auto Trait Implementations§
impl Freeze for GraphRenderer
impl RefUnwindSafe for GraphRenderer
impl Send for GraphRenderer
impl Sync for GraphRenderer
impl Unpin for GraphRenderer
impl UnwindSafe for GraphRenderer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more