Enum ecmascript::ast::UnaryOperator[][src]

pub enum UnaryOperator {
    Minus,
    Plus,
    Not,
    BitwiseNot,
    Typeof,
    Void,
    Delete,
}

These operators take 1 operand, and are a prefix of the operand. Reference

Variants

Reverse the sign on the operand. This will do type coercion first. eg. (-1)

Make the operand a positive number. This will do type coercion first. eg (+(-1) is 1)

Logically reverse the operand. This will do type coercion first. eg. (!true is false)

Logcally reverse all the bits on the operand. This will do type coercion first. eg (~9 is -10) (the sign bit is also reversed)

Check the internal type of the operand, and return a string that represents the type. eg (typeof {}) is 'object'

This operator will evaluate the operand, and then return undefined itself. This can be used for invoke a function epxression immediately for example.

This operator will remove a property from an object. It will return true when the property was successfully deleted, and false when it wasnt.

Trait Implementations

impl Debug for UnaryOperator
[src]

Formats the value using the given formatter. Read more

impl Clone for UnaryOperator
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for UnaryOperator
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations