Enum dotavious::attributes::AttributeText[][src]

pub enum AttributeText<'a> {
    AttrStr(Cow<'a, str>),
    EscStr(Cow<'a, str>),
    HtmlStr(Cow<'a, str>),
    QuotedStr(Cow<'a, str>),
}
Expand description

The text for a graphviz label on a node or edge.

Variants

AttrStr(Cow<'a, str>)

Preserves the text directly as is.

Tuple Fields of AttrStr

0: Cow<'a, str>
EscStr(Cow<'a, str>)

This kind of label uses the graphviz label escString type: http://www.graphviz.org/doc/info/attrs.html#k:escString

Occurrences of backslashes (\) are not escaped; instead they are interpreted as initiating an escString escape sequence.

Escape sequences of particular interest: in addition to \n to break a line (centering the line preceding the \n), there are also the escape sequences \l which left-justifies the preceding line and \r which right-justifies it.

Tuple Fields of EscStr

0: Cow<'a, str>
HtmlStr(Cow<'a, str>)

This uses a graphviz HTML string label. The string is printed exactly as given, but between < and >. No escaping is performed.

Tuple Fields of HtmlStr

0: Cow<'a, str>
QuotedStr(Cow<'a, str>)

Preserves the text directly as is but wrapped in quotes.

Occurrences of backslashes (\) are escaped, and thus appear as backslashes in the rendered label.

Tuple Fields of QuotedStr

0: Cow<'a, str>

Implementations

Renders text as string suitable for a attribute in a .dot file. This includes quotes or suitable delimiters.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Compare self to key and return true if they are equal.

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into #41263)

recently added

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.