pub struct Graph {
direction: Direction,
nodes: Vec<Box<str>>,
edges: Vec<(Box<str>, Box<str>)>,
}Expand description
Builder for mermaid flowchart diagrams.
Fields§
§direction: Direction§nodes: Vec<Box<str>>§edges: Vec<(Box<str>, Box<str>)>Implementations§
Source§impl Graph
impl Graph
Sourcepub fn node(self, name: impl Into<String>) -> Self
pub fn node(self, name: impl Into<String>) -> Self
Add a standalone node (rendered only if it has no edges).
Sourcepub fn edge(self, from: impl Into<String>, to: impl Into<String>) -> Self
pub fn edge(self, from: impl Into<String>, to: impl Into<String>) -> Self
Add a directed edge from from to to.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Graph
impl RefUnwindSafe for Graph
impl Send for Graph
impl Sync for Graph
impl Unpin for Graph
impl UnsafeUnpin for Graph
impl UnwindSafe for Graph
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