pub enum BuiltinMacroFunction {
    Min,
    Max,
    Mod,
    CubicBezier,
    Rgb,
    Debug,
}
Expand description

A builtin function which is handled by the compiler pass

Builtin function expect their arguments in one and a specific type, so that’s easier for the generator. Macro however can do some transformation on their argument.

Variants§

§

Min

Transform min(a, b, c, ..., z) into a series of conditional expression and comparisons

§

Max

Transform max(a, b, c, ..., z) into a series of conditional expression and comparisons

§

Mod

Add the right conversion operations so that the return type is the same as the argument type

§

CubicBezier

§

Rgb

The argument can be r,g,b,a or r,g,b and they can be percentages or integer. transform the argument so it is always rgb(r, g, b, a) with r, g, b between 0 and 255.

§

Debug

transform debug(a, b, c) into debug a + " " + b + " " + c

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.