Skip to main content

NodeShape

Enum NodeShape 

Source
pub enum NodeShape {
Show 16 variants Rectangle, Rounded, Diamond, Circle, Stadium, Subroutine, Cylinder, Hexagon, Asymmetric, Parallelogram, Trapezoid, ParallelogramBackslash, TrapezoidInverted, DoubleCircle, Bar(BarOrientation), Note,
}
Expand description

The visual shape used to render a node.

Variants§

§

Rectangle

Square corners: ┌──┐ │ │ └──┘

§

Rounded

Rounded corners: ╭──╮ │ │ ╰──╯

§

Diamond

Diamond / decision box rendered with / and \ corners.

§

Circle

Circle rendered as a rounded box with parenthesis markers.

§

Stadium

Stadium / pill: rounded box with ( / ) markers at vertical midpoints.

Mermaid syntax: ([label])

§

Subroutine

Subroutine: rectangle with an extra inner vertical bar on each side.

Mermaid syntax: [[label]]

§

Cylinder

Cylinder (database): rectangle with arc markers at top and bottom centres.

Mermaid syntax: [(label)]

§

Hexagon

Hexagon: rectangle with < / > markers at vertical midpoints of left/right edges.

Mermaid syntax: {{label}}

§

Asymmetric

Asymmetric flag: rectangle with a marker at the right vertical midpoint.

Mermaid syntax: >label]

§

Parallelogram

Parallelogram (lean-right): rectangle with / markers at top-left / bottom-right corners.

Mermaid syntax: [/label/]

§

Trapezoid

Trapezoid (wider top): rectangle with / at top-left and \ at top-right corners.

Mermaid syntax: [/label\]

§

ParallelogramBackslash

Parallelogram leaning left (backslash variant): rectangle with \ markers at top-left and bottom-right corners.

Mermaid syntax: [\label\]

§

TrapezoidInverted

Inverted trapezoid (wider bottom): rectangle with \ at top-left and / at top-right corners, indicating a narrower top.

Mermaid syntax: [\label/]

§

DoubleCircle

Double circle: two concentric rounded boxes, one cell inside the other.

Mermaid syntax: (((label)))

§

Bar(BarOrientation)

UML synchronisation bar — a single line used as a fork (one incoming, many outgoing) or join (many incoming, one outgoing) point in parallel-flow state machines.

The orientation is perpendicular to the flow direction (so edges fan in/out across its long axis):

Fork and join are visually identical (only the semantic role differs); both use this single shape variant. The renderer skips drawing the node label for Bar(_) shapes — bars are connection points, not labelled states.

Mermaid syntax: state X <<fork>> / state X <<join>> (and the [[…]] alternative spellings).

§

Note

State-diagram note (Mermaid note left|right|over of …). Synthesised at parse time as a regular Node with this shape and connected to its anchor via an EdgeStyle::Dotted / EdgeEndpoint::None edge. Renders as a small rounded box — the dotted connector visually distinguishes it from regular rounded states without needing a separate dashed-border primitive (a future variant could add one).

Trait Implementations§

Source§

impl Clone for NodeShape

Source§

fn clone(&self) -> NodeShape

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for NodeShape

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for NodeShape

Source§

fn default() -> NodeShape

Returns the “default value” for a type. Read more
Source§

impl PartialEq for NodeShape

Source§

fn eq(&self, other: &NodeShape) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for NodeShape

Source§

impl Eq for NodeShape

Source§

impl StructuralPartialEq for NodeShape

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.