[][src]Enum peepmatic_runtime::operator::UnquoteOperator

#[repr(u32)]pub enum UnquoteOperator {
    Band,
    Bor,
    Bxor,
    Iadd,
    Imul,
    Log2,
    Neg,
}

Compile-time unquote operators.

These are used in the right-hand side to perform compile-time evaluation of constants matched on the left-hand side.

Variants

Band

Compile-time band of two constant values.

Bor

Compile-time bor of two constant values.

Bxor

Compile-time bxor of two constant values.

Iadd

Compile-time iadd of two constant values.

Imul

Compile-time imul of two constant values.

Log2

Take the base-2 log of a power of two integer.

Neg

Wrapping negation of an integer.

Implementations

impl UnquoteOperator[src]

pub fn immediates_arity(&self) -> u8[src]

Get the number of immediates that this operator has.

pub fn params_arity(&self) -> u8[src]

Get the number of parameters that this operator takes.

pub const fn num_operators() -> usize[src]

Get the total number of different operators.

Trait Implementations

impl Clone for UnquoteOperator[src]

impl Copy for UnquoteOperator[src]

impl Debug for UnquoteOperator[src]

impl<'de> Deserialize<'de> for UnquoteOperator[src]

impl Display for UnquoteOperator[src]

impl Eq for UnquoteOperator[src]

impl Hash for UnquoteOperator[src]

impl PartialEq<UnquoteOperator> for UnquoteOperator[src]

impl Serialize for UnquoteOperator[src]

impl StructuralEq for UnquoteOperator[src]

impl StructuralPartialEq for UnquoteOperator[src]

impl TryFrom<u32> for UnquoteOperator[src]

type Error = &'static str

The type returned in the event of a conversion error.

Auto Trait Implementations

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[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.