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>),
}

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

Variants

AttrStr(Cow<'a, str>)

Preserves the text directly as is.

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.

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.

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.

Implementations

impl<'a> AttributeText<'a>[src]

pub fn attr<S: Into<Cow<'a, str>>>(s: S) -> AttributeText<'a>[src]

pub fn escaped<S: Into<Cow<'a, str>>>(s: S) -> AttributeText<'a>[src]

pub fn html<S: Into<Cow<'a, str>>>(s: S) -> AttributeText<'a>[src]

pub fn quoted<S: Into<Cow<'a, str>>>(s: S) -> AttributeText<'a>[src]

pub fn dot_string(&self) -> String[src]

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

Trait Implementations

impl<'a> Clone for AttributeText<'a>[src]

impl<'a> Debug for AttributeText<'a>[src]

impl<'a> Eq for AttributeText<'a>[src]

impl<'a> From<ArrowType> for AttributeText<'a>[src]

impl<'a> From<ClusterMode> for AttributeText<'a>[src]

impl<'a> From<Color<'a>> for AttributeText<'a>[src]

impl<'a> From<ColorList<'a>> for AttributeText<'a>[src]

impl<'a> From<CompassPoint> for AttributeText<'a>[src]

impl<'a> From<Direction> for AttributeText<'a>[src]

impl<'a> From<EdgeStyle> for AttributeText<'a>[src]

impl<'a> From<GraphStyle> for AttributeText<'a>[src]

impl<'a> From<ImagePosition> for AttributeText<'a>[src]

impl<'a> From<ImageScale> for AttributeText<'a>[src]

impl<'a> From<LabelJustification> for AttributeText<'a>[src]

impl<'a> From<LabelLocation> for AttributeText<'a>[src]

impl<'a> From<NodeStyle> for AttributeText<'a>[src]

impl<'a> From<Ordering> for AttributeText<'a>[src]

impl<'a> From<OutputMode> for AttributeText<'a>[src]

impl<'a> From<PackMode> for AttributeText<'a>[src]

impl<'a> From<PageDirection> for AttributeText<'a>[src]

impl<'a> From<Point> for AttributeText<'a>[src]

impl<'a> From<PortPosition> for AttributeText<'a>[src]

impl<'a> From<RankDir> for AttributeText<'a>[src]

impl<'a> From<Ratio> for AttributeText<'a>[src]

impl<'a> From<Rectangle> for AttributeText<'a>[src]

impl<'a> From<Shape> for AttributeText<'a>[src]

impl<'a> From<SplineType> for AttributeText<'a>[src]

impl<'a> From<Splines> for AttributeText<'a>[src]

impl<'a> From<Styles> for AttributeText<'a>[src]

impl<'a> From<bool> for AttributeText<'a>[src]

impl<'a> From<f32> for AttributeText<'a>[src]

impl<'a> From<u32> for AttributeText<'a>[src]

impl<'a> PartialEq<AttributeText<'a>> for AttributeText<'a>[src]

impl<'a> StructuralEq for AttributeText<'a>[src]

impl<'a> StructuralPartialEq for AttributeText<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for AttributeText<'a>

impl<'a> Send for AttributeText<'a>

impl<'a> Sync for AttributeText<'a>

impl<'a> Unpin for AttributeText<'a>

impl<'a> UnwindSafe for AttributeText<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.