[][src]Enum boa::syntax::ast::op::LogOp

pub enum LogOp {
    And,
    Or,
}

Logical operators are typically used with Boolean (logical) values; when they are, they return a Boolean value.

However, the && and || operators actually return the value of one of the specified operands, so if these operators are used with non-Boolean values, they may return a non-Boolean value.

More information:

Variants

And

The logical AND operator returns the value of the first operand if it can be coerced into false; otherwise, it returns the second operand.

Syntax: x && y

More information:

Or

The logical OR operator returns the value the first operand if it can be coerced into true; otherwise, it returns the second operand.

Syntax: x || y

More information:

  • [ECMAScript reference](
  • [MDN documentation][mdn]

[spec]: https://tc39.es/ecma262/#prod-LogicalORExpression) [mdn]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Logical_Operators#Logical_OR

Trait Implementations

impl Clone for LogOp[src]

impl Copy for LogOp[src]

impl Debug for LogOp[src]

impl Display for LogOp[src]

impl Finalize for LogOp[src]

impl From<LogOp> for BinOp[src]

impl PartialEq<LogOp> for LogOp[src]

impl StructuralPartialEq for LogOp[src]

impl Trace for LogOp[src]

Auto Trait Implementations

impl RefUnwindSafe for LogOp

impl Send for LogOp

impl Sync for LogOp

impl Unpin for LogOp

impl UnwindSafe for LogOp

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

impl<T> NativeObject for T where
    T: Any + Debug + Trace
[src]

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

type Owned = T

The resulting type after obtaining ownership.

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

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<V, T> VZip<V> for T where
    V: MultiLane<T>,