pub struct RenderableGraph {
pub current_id: usize,
pub nodes: Vec<Node>,
pub edges: Vec<Edge>,
}Fields§
§current_id: usize§nodes: Vec<Node>§edges: Vec<Edge>Implementations§
Source§impl RenderableGraph
impl RenderableGraph
pub fn new() -> Self
pub fn create_node(&mut self, label: String) -> &mut Node
pub fn create_edge(&mut self, label: String, from: usize, to: usize)
pub fn build_graph(model: Model, model_summary: Option<ModelSummary>) -> Self
Trait Implementations§
Source§impl Debug for RenderableGraph
impl Debug for RenderableGraph
Source§impl Default for RenderableGraph
impl Default for RenderableGraph
Source§fn default() -> RenderableGraph
fn default() -> RenderableGraph
Returns the “default value” for a type. Read more
Source§impl<'a> Labeller<'a, usize, Edge> for RenderableGraph
impl<'a> Labeller<'a, usize, Edge> for RenderableGraph
Source§fn node_id(&'a self, n: &usize) -> Id<'a>
fn node_id(&'a self, n: &usize) -> Id<'a>
Maps
n to a unique identifier with respect to self. The
implementer is responsible for ensuring that the returned name
is a valid DOT identifier.Source§fn node_label<'b>(&'b self, n: &usize) -> LabelText<'b>
fn node_label<'b>(&'b self, n: &usize) -> LabelText<'b>
Maps
n to a label that will be used in the rendered output.
The label need not be unique, and may be the empty string; the
default is just the output from node_id.Source§fn edge_label<'b>(&'b self, e: &Edge) -> LabelText<'b>
fn edge_label<'b>(&'b self, e: &Edge) -> LabelText<'b>
Maps
e to a label that will be used in the rendered output.
The label need not be unique, and may be the empty string; the
default is in fact the empty string.Source§fn node_style(&'a self, _n: &usize) -> Style
fn node_style(&'a self, _n: &usize) -> Style
Maps
n to a style that will be used in the rendered output.Source§fn node_attrs(&'a self, n: &usize) -> HashMap<&str, &str>
fn node_attrs(&'a self, n: &usize) -> HashMap<&str, &str>
Maps
n to a set of arbritrary node attributes.Source§fn graph_attrs(&'a self) -> HashMap<&'a str, &'a str>
fn graph_attrs(&'a self) -> HashMap<&'a str, &'a str>
A list of attributes to apply to the graph
Source§fn rank_dir(&'a self) -> Option<RankDir>
fn rank_dir(&'a self) -> Option<RankDir>
Return an explicit rank dir to use for directed graphs. Read more
Source§fn edge_end_arrow(&'a self, _e: &E) -> Arrow
fn edge_end_arrow(&'a self, _e: &E) -> Arrow
Maps
e to arrow style that will be used on the end of an edge.
Defaults to default arrow style.Source§fn edge_start_arrow(&'a self, _e: &E) -> Arrow
fn edge_start_arrow(&'a self, _e: &E) -> Arrow
Maps
e to arrow style that will be used on the end of an edge.
Defaults to default arrow style.Source§fn edge_style(&'a self, _e: &E) -> Style
fn edge_style(&'a self, _e: &E) -> Style
Maps
e to a style that will be used in the rendered output.Source§fn edge_attrs(&'a self, _e: &E) -> HashMap<&'a str, &'a str>
fn edge_attrs(&'a self, _e: &E) -> HashMap<&'a str, &'a str>
Maps
e to a set of arbritrary edge attributes.Source§fn edge_start_point(&'a self, _e: &E) -> Option<CompassPoint>
fn edge_start_point(&'a self, _e: &E) -> Option<CompassPoint>
Maps
e to the compass point that the edge will start from.
Defaults to the default pointSource§fn edge_end_point(&'a self, _e: &E) -> Option<CompassPoint>
fn edge_end_point(&'a self, _e: &E) -> Option<CompassPoint>
Maps
e to the compass point that the edge will end at.
Defaults to the default pointAuto Trait Implementations§
impl Freeze for RenderableGraph
impl RefUnwindSafe for RenderableGraph
impl Send for RenderableGraph
impl Sync for RenderableGraph
impl Unpin for RenderableGraph
impl UnwindSafe for RenderableGraph
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
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