pub struct GraphApi<'a> { /* private fields */ }
Expand description
Graph generation API for built flows
Implementations§
Source§impl<'a> GraphApi<'a>
impl<'a> GraphApi<'a>
pub fn new( ir: &'a [HydroRoot], process_id_name: &'a [(usize, String)], cluster_id_name: &'a [(usize, String)], external_id_name: &'a [(usize, String)], ) -> Self
Sourcepub fn mermaid_to_string(
&self,
show_metadata: bool,
show_location_groups: bool,
use_short_labels: bool,
) -> String
pub fn mermaid_to_string( &self, show_metadata: bool, show_location_groups: bool, use_short_labels: bool, ) -> String
Generate mermaid graph as string
Sourcepub fn dot_to_string(
&self,
show_metadata: bool,
show_location_groups: bool,
use_short_labels: bool,
) -> String
pub fn dot_to_string( &self, show_metadata: bool, show_location_groups: bool, use_short_labels: bool, ) -> String
Generate DOT graph as string
Sourcepub fn reactflow_to_string(
&self,
show_metadata: bool,
show_location_groups: bool,
use_short_labels: bool,
) -> String
pub fn reactflow_to_string( &self, show_metadata: bool, show_location_groups: bool, use_short_labels: bool, ) -> String
Generate ReactFlow graph as string
Sourcepub fn mermaid_to_file(
&self,
filename: &str,
show_metadata: bool,
show_location_groups: bool,
use_short_labels: bool,
) -> Result<(), Box<dyn Error>>
pub fn mermaid_to_file( &self, filename: &str, show_metadata: bool, show_location_groups: bool, use_short_labels: bool, ) -> Result<(), Box<dyn Error>>
Write mermaid graph to file
Sourcepub fn dot_to_file(
&self,
filename: &str,
show_metadata: bool,
show_location_groups: bool,
use_short_labels: bool,
) -> Result<(), Box<dyn Error>>
pub fn dot_to_file( &self, filename: &str, show_metadata: bool, show_location_groups: bool, use_short_labels: bool, ) -> Result<(), Box<dyn Error>>
Write DOT graph to file
Sourcepub fn reactflow_to_file(
&self,
filename: &str,
show_metadata: bool,
show_location_groups: bool,
use_short_labels: bool,
) -> Result<(), Box<dyn Error>>
pub fn reactflow_to_file( &self, filename: &str, show_metadata: bool, show_location_groups: bool, use_short_labels: bool, ) -> Result<(), Box<dyn Error>>
Write ReactFlow graph to file
Sourcepub fn mermaid_to_browser(
&self,
show_metadata: bool,
show_location_groups: bool,
use_short_labels: bool,
message_handler: Option<&dyn Fn(&str)>,
) -> Result<(), Box<dyn Error>>
pub fn mermaid_to_browser( &self, show_metadata: bool, show_location_groups: bool, use_short_labels: bool, message_handler: Option<&dyn Fn(&str)>, ) -> Result<(), Box<dyn Error>>
Open mermaid graph in browser
Sourcepub fn dot_to_browser(
&self,
show_metadata: bool,
show_location_groups: bool,
use_short_labels: bool,
message_handler: Option<&dyn Fn(&str)>,
) -> Result<(), Box<dyn Error>>
pub fn dot_to_browser( &self, show_metadata: bool, show_location_groups: bool, use_short_labels: bool, message_handler: Option<&dyn Fn(&str)>, ) -> Result<(), Box<dyn Error>>
Open DOT graph in browser
Sourcepub fn reactflow_to_browser(
&self,
show_metadata: bool,
show_location_groups: bool,
use_short_labels: bool,
message_handler: Option<&dyn Fn(&str)>,
) -> Result<(), Box<dyn Error>>
pub fn reactflow_to_browser( &self, show_metadata: bool, show_location_groups: bool, use_short_labels: bool, message_handler: Option<&dyn Fn(&str)>, ) -> Result<(), Box<dyn Error>>
Open ReactFlow graph in browser
Sourcepub fn generate_all_files(
&self,
prefix: &str,
show_metadata: bool,
show_location_groups: bool,
use_short_labels: bool,
) -> Result<(), Box<dyn Error>>
pub fn generate_all_files( &self, prefix: &str, show_metadata: bool, show_location_groups: bool, use_short_labels: bool, ) -> Result<(), Box<dyn Error>>
Generate all graph types and save to files with a given prefix
Sourcepub fn generate_graph_with_config(
&self,
config: &GraphConfig,
message_handler: Option<&dyn Fn(&str)>,
) -> Result<(), Box<dyn Error>>
pub fn generate_graph_with_config( &self, config: &GraphConfig, message_handler: Option<&dyn Fn(&str)>, ) -> Result<(), Box<dyn Error>>
Generate graph based on GraphConfig, delegating to the appropriate method
Sourcepub fn generate_all_files_with_config(
&self,
config: &GraphConfig,
prefix: &str,
) -> Result<(), Box<dyn Error>>
pub fn generate_all_files_with_config( &self, config: &GraphConfig, prefix: &str, ) -> Result<(), Box<dyn Error>>
Generate all graph files based on GraphConfig
Auto Trait Implementations§
impl<'a> Freeze for GraphApi<'a>
impl<'a> !RefUnwindSafe for GraphApi<'a>
impl<'a> !Send for GraphApi<'a>
impl<'a> !Sync for GraphApi<'a>
impl<'a> Unpin for GraphApi<'a>
impl<'a> !UnwindSafe for GraphApi<'a>
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more