[][src]Enum genco::dart::Dart

pub enum Dart<'el> {
    BuiltIn {
        name: &'static str,
    },
    Void,
    Dynamic,
    Type(Type<'el>),
}

Dart token specialization.

Variants

BuiltIn

built-in type.

Fields of BuiltIn

name: &'static str

The built-in type.

Void

the void type.

Dynamic

the dynamic type.

Type(Type<'el>)

referenced types.

Implementations

impl<'el> Dart<'el>[src]

pub fn alias(&self, alias: impl Into<Cons<'el>>) -> Dart<'el>[src]

Change the imported alias for this type.

pub fn name(&self, name: impl Into<Cons<'el>>) -> Dart<'el>[src]

Change the imported name for this type.

pub fn with_arguments(&self, arguments: Vec<Dart<'el>>) -> Dart<'el>[src]

Add arguments to the given variable.

Only applies to classes, any other will return the same value.

pub fn arguments(&self) -> Option<&[Dart<'el>]>[src]

Get the arguments.

pub fn is_built_in(&self) -> bool[src]

Check if variable is built-in.

pub fn raw(&self) -> Dart<'el>[src]

Convert into raw type. Raw types have no alias, nor generic arguments.

pub fn is_core(&self) -> bool[src]

Check if this type belongs to a core package.

pub fn is_generic(&self) -> bool[src]

Check if type is generic.

Trait Implementations

impl<'el> Clone for Dart<'el>[src]

impl<'el> Custom for Dart<'el>[src]

type Extra = Extra

Extra data associated with building a formatting element.

impl<'el> Debug for Dart<'el>[src]

impl<'el> Eq for Dart<'el>[src]

impl<'el> From<&'el Dart<'el>> for Tokens<'el, Dart<'el>>[src]

impl<'el> From<Dart<'el>> for Tokens<'el, Dart<'el>>[src]

impl<'el> Hash for Dart<'el>[src]

impl<'el> Ord for Dart<'el>[src]

impl<'el> PartialEq<Dart<'el>> for Dart<'el>[src]

impl<'el> PartialOrd<Dart<'el>> for Dart<'el>[src]

impl<'el> StructuralEq for Dart<'el>[src]

impl<'el> StructuralPartialEq for Dart<'el>[src]

Auto Trait Implementations

impl<'el> !RefUnwindSafe for Dart<'el>

impl<'el> !Send for Dart<'el>

impl<'el> !Sync for Dart<'el>

impl<'el> Unpin for Dart<'el>

impl<'el> UnwindSafe for Dart<'el>

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, 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.