[][src]Struct minitt::ast::Declaration

pub struct Declaration {
    pub pattern: Pattern,
    pub prefix_parameters: Vec<Typed>,
    pub signature: Expression,
    pub body: Expression,
    pub declaration_type: DeclarationType,
}

Decl in Mini-TT.

Fields

pattern: Patternprefix_parameters: Vec<Typed>signature: Expressionbody: Expressiondeclaration_type: DeclarationType

Methods

impl Declaration[src]

pub fn new(
    pattern: Pattern,
    prefix_parameters: Vec<Typed>,
    signature: Expression,
    body: Expression,
    declaration_type: DeclarationType
) -> Self
[src]

Constructor

pub fn simple(
    pattern: Pattern,
    prefix_parameters: Vec<Typed>,
    signature: Expression,
    body: Expression
) -> Self
[src]

Non-recursive declarations

pub fn recursive(
    pattern: Pattern,
    prefix_parameters: Vec<Typed>,
    signature: Expression,
    body: Expression
) -> Self
[src]

Recursive declarations

Trait Implementations

impl Clone for Declaration[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq<Declaration> for Declaration[src]

impl Eq for Declaration[src]

impl Display for Declaration[src]

impl Debug for Declaration[src]

Auto Trait Implementations

impl !Send for Declaration

impl !Sync for Declaration

Blanket Implementations

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> From for T[src]

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

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

type Owned = T

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

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

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

The type returned in the event of a conversion error.