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
Minus
Reverse the sign on the operand. This will do type coercion first. eg. (-1)
Plus
Make the operand a positive number. This will do type coercion first. eg (+(-1) is 1)
Not
Logically reverse the operand. This will do type coercion first. eg. (!true is false)
BitwiseNot
Logcally reverse all the bits on the operand. This will do type coercion first. eg (~9 is -10) (the sign bit is also reversed)
Typeof
Check the internal type of the operand, and return a string that represents the type. eg (typeof {}) is 'object'
Void
This operator will evaluate the operand, and then return undefined itself. This can be used for invoke a function epxression immediately for example.
Delete
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]
impl Debug for UnaryOperator
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for UnaryOperator
[src]
impl Clone for UnaryOperator
fn clone(&self) -> UnaryOperator
[src]
fn clone(&self) -> UnaryOperator
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl PartialEq for UnaryOperator
[src]
impl PartialEq for UnaryOperator
Auto Trait Implementations
impl Send for UnaryOperator
impl Send for UnaryOperator
impl Sync for UnaryOperator
impl Sync for UnaryOperator