pub struct HydroReactFlow<W> { /* private fields */ }
Expand description
ReactFlow.js graph writer for Hydro IR. Outputs JSON that can be directly used with ReactFlow.js for interactive graph visualization.
Implementations§
Source§impl<W> HydroReactFlow<W>
impl<W> HydroReactFlow<W>
pub fn new(write: W, config: &HydroWriteConfig) -> Self
Trait Implementations§
Source§impl<W> HydroGraphWrite for HydroReactFlow<W>where
W: Write,
impl<W> HydroGraphWrite for HydroReactFlow<W>where
W: Write,
Source§fn write_node_definition(
&mut self,
node_id: usize,
node_label: &NodeLabel,
node_type: HydroNodeType,
location_id: Option<usize>,
location_type: Option<&str>,
) -> Result<(), Self::Err>
fn write_node_definition( &mut self, node_id: usize, node_label: &NodeLabel, node_type: HydroNodeType, location_id: Option<usize>, location_type: Option<&str>, ) -> Result<(), Self::Err>
Write a node definition with styling.
Source§fn write_edge(
&mut self,
src_id: usize,
dst_id: usize,
edge_type: HydroEdgeType,
label: Option<&str>,
) -> Result<(), Self::Err>
fn write_edge( &mut self, src_id: usize, dst_id: usize, edge_type: HydroEdgeType, label: Option<&str>, ) -> Result<(), Self::Err>
Write an edge between nodes with optional labeling.
Source§fn write_location_start(
&mut self,
location_id: usize,
location_type: &str,
) -> Result<(), Self::Err>
fn write_location_start( &mut self, location_id: usize, location_type: &str, ) -> Result<(), Self::Err>
Begin writing a location grouping (process/cluster).
Auto Trait Implementations§
impl<W> Freeze for HydroReactFlow<W>where
W: Freeze,
impl<W> RefUnwindSafe for HydroReactFlow<W>where
W: RefUnwindSafe,
impl<W> Send for HydroReactFlow<W>where
W: Send,
impl<W> Sync for HydroReactFlow<W>where
W: Sync,
impl<W> Unpin for HydroReactFlow<W>where
W: Unpin,
impl<W> UnwindSafe for HydroReactFlow<W>where
W: UnwindSafe,
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