pub trait Attributes: Sized {
Show 19 methods fn set(&mut self, name: &str, value: &str, quote: bool) -> &mut Self; fn set_font(&mut self, label: &str) -> &mut Self { ... } fn set_html(&mut self, label: &str) -> &mut Self { ... } fn set_label(&mut self, label: &str) -> &mut Self { ... } fn set_head_label(&mut self, label: &str) -> &mut Self { ... } fn set_tail_label(&mut self, label: &str) -> &mut Self { ... } fn set_color(&mut self, color: Color) -> &mut Self { ... } fn set_fill_color(&mut self, color: Color) -> &mut Self { ... } fn set_font_color(&mut self, color: Color) -> &mut Self { ... } fn set_background_color(&mut self, color: Color) -> &mut Self { ... } fn set_shape(&mut self, shape: Shape) -> &mut Self { ... } fn set_style(&mut self, style: Style) -> &mut Self { ... } fn set_arrow_head(&mut self, arrow_type: ArrowType) -> &mut Self { ... } fn set_arrow_tail(&mut self, arrow_type: ArrowType) -> &mut Self { ... } fn set_rank(&mut self, rank: Rank) -> &mut Self { ... } fn set_pen_width(&mut self, width: f32) -> &mut Self { ... } fn set_arrow_size(&mut self, size: f32) -> &mut Self { ... } fn set_font_size(&mut self, size: f32) -> &mut Self { ... } fn set_rank_direction(&mut self, rank_direction: RankDirection) -> &mut Self { ... }
}
Expand description

Structs that implement Attributes are used for writing the attributes of a diagraph, graph, subgraph, subgraph cluster, node or edge.

The raw Attributes::set function is provided for setting arbitary atrributes, but it is recommended to use the more typesafe functions where available. If a typesafe function is missing and you have to use the set function, please do file an issue in the github and we can add it.

Required Methods

Sets an attribute. See the Graphviz documentation for a full list of available names and values. Set the arguement quote to true if the value should be written in quotes ", to escape any special characters. Note that any quote in the string need to be escaped before calling. This function does NOT check that name or value are valid DOT strings.

Provided Methods

Set the name of the font family for label text

Set arbitary html, useful for constructing more complex nodes

Set the display label for a graph, node or edge

Set the label to appear at the head of an edge

Set the label to appear at the tail of an edge

Set the edge or line color

Set the color to fill the area with

Set the color of the font used for text

Set the background color

Set the shape of a graph, subgraph, cluster or node

Set the style

Set type of arrow head for edge lines (the arrow at the destination)

Set type of arrow tail for edge lines (the arrow at the source)

Set the relative rank, which affects layout

Set the pen width for drawing lines

Set the arrow size

Set the font size

Implementors