[][src]Enum tabbycat::Identity

pub enum Identity<'a> {
    String(&'a str),
    Usize(usize),
    ISize(isize),
    I8(i8),
    U8(u8),
    I16(i16),
    U16(u16),
    I32(i32),
    U32(u32),
    Bool(bool),
    I64(i64),
    U64(u64),
    I128(i128),
    U128(u128),
    Float(f32),
    Double(f64),
    Quoted(&'a str),
    ArrowName([Option<&'a str>; 4]),
    RGBA(u8u8u8u8),
    HSV(f32f32f32),
    Point2D(f32f32bool),
    Point3D(f32f32f32bool),
}

An identity in the dot language. You are recommended to construct it in one of the following ways:

  • attributes method
  • Identity::id for checked id strings
  • Identity::quoted for quoted safe strings
  • Identity::from for numeral types

However, if you need to create some special identities like HTML, you can use Identity::String directly.

Variants

String(&'a str)
Usize(usize)
ISize(isize)
I8(i8)
U8(u8)
I16(i16)
U16(u16)
I32(i32)
U32(u32)
Bool(bool)
I64(i64)
U64(u64)
I128(i128)
U128(u128)
Float(f32)
Double(f64)
Quoted(&'a str)
ArrowName([Option<&'a str>; 4])
RGBA(u8u8u8u8)
HSV(f32f32f32)
Point2D(f32f32bool)
Point3D(f32f32f32bool)

Implementations

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

pub fn id(data: &'a str) -> Result<Self>[src]

create a checked id string, the lexical rule is: ^[a-zA-Z\x{80}-\x{ff}_][a-zA-Z\x{80}-\x{ff}\d_]*$

pub fn quoted(data: &'a str) -> Self[src]

create a quoted string

Trait Implementations

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

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

impl<'a> Display for Identity<'a>[src]

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

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

impl<'a> From<DirType> for Identity<'a>[src]

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

impl<'a> From<PageDir> for Identity<'a>[src]

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

impl<'a> From<QuadType> for Identity<'a>[src]

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

impl<'a> From<RankType> for Identity<'a>[src]

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

impl<'a> From<SmoothType> for Identity<'a>[src]

impl<'a> From<Style> for Identity<'a>[src]

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

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

impl<'a> From<f64> for Identity<'a>[src]

impl<'a> From<i128> for Identity<'a>[src]

impl<'a> From<i16> for Identity<'a>[src]

impl<'a> From<i32> for Identity<'a>[src]

impl<'a> From<i64> for Identity<'a>[src]

impl<'a> From<i8> for Identity<'a>[src]

impl<'a> From<isize> for Identity<'a>[src]

impl<'a> From<u128> for Identity<'a>[src]

impl<'a> From<u16> for Identity<'a>[src]

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

impl<'a> From<u64> for Identity<'a>[src]

impl<'a> From<u8> for Identity<'a>[src]

impl<'a> From<usize> for Identity<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for Identity<'a>[src]

impl<'a> Send for Identity<'a>[src]

impl<'a> Sync for Identity<'a>[src]

impl<'a> Unpin for Identity<'a>[src]

impl<'a> UnwindSafe for Identity<'a>[src]

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<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> ToString for T where
    T: Display + ?Sized
[src]

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.