[][src]Enum dora_parser::ast::Type

pub enum Type {
    TypeSelf(TypeSelfType),
    TypeBasic(TypeBasicType),
    TypeTuple(TypeTupleType),
    TypeLambda(TypeLambdaType),
}

Variants

TypeSelf(TypeSelfType)
TypeBasic(TypeBasicType)
TypeTuple(TypeTupleType)
TypeLambda(TypeLambdaType)

Methods

impl Type[src]

pub fn create_self(id: NodeId, pos: Position, span: Span) -> Type[src]

pub fn create_basic(
    id: NodeId,
    pos: Position,
    span: Span,
    name: Name,
    params: Vec<Box<Type>>
) -> Type
[src]

pub fn create_fct(
    id: NodeId,
    pos: Position,
    span: Span,
    params: Vec<Box<Type>>,
    ret: Box<Type>
) -> Type
[src]

pub fn create_tuple(
    id: NodeId,
    pos: Position,
    span: Span,
    subtypes: Vec<Box<Type>>
) -> Type
[src]

pub fn to_basic(&self) -> Option<&TypeBasicType>[src]

pub fn to_basic_without_type_params(&self) -> Option<Name>[src]

pub fn to_tuple(&self) -> Option<&TypeTupleType>[src]

pub fn to_fct(&self) -> Option<&TypeLambdaType>[src]

pub fn to_string(&self, interner: &Interner) -> String[src]

pub fn pos(&self) -> Position[src]

pub fn id(&self) -> NodeId[src]

Trait Implementations

impl Clone for Type[src]

impl Debug for Type[src]

Auto Trait Implementations

impl Send for Type

impl Sync for Type

impl Unpin for Type

impl UnwindSafe for Type

impl RefUnwindSafe for Type

Blanket Implementations

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

impl<T> From<T> for 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.

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

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

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

impl<T> Erased for T