Enum ckb_vm::instructions::ast::Value

source ·
pub enum Value {
    Imm(u64),
    Register(usize),
    Op1(ActionOp1, Rc<Value>),
    Op2(ActionOp2, Rc<Value>, Rc<Value>),
    SignOp2(SignActionOp2, Rc<Value>, Rc<Value>, bool),
    Cond(Rc<Value>, Rc<Value>, Rc<Value>),
    Load(Rc<Value>, u8),
}

Variants§

§

Imm(u64)

§

Register(usize)

§

Op1(ActionOp1, Rc<Value>)

§

Op2(ActionOp2, Rc<Value>, Rc<Value>)

§

SignOp2(SignActionOp2, Rc<Value>, Rc<Value>, bool)

§

Cond(Rc<Value>, Rc<Value>, Rc<Value>)

§

Load(Rc<Value>, u8)

Trait Implementations§

source§

impl BitAnd for Value

§

type Output = Value

The resulting type after applying the & operator.
source§

fn bitand(self, rhs: Self) -> Value

Performs the & operation. Read more
source§

impl BitOr for Value

§

type Output = Value

The resulting type after applying the | operator.
source§

fn bitor(self, rhs: Self) -> Value

Performs the | operation. Read more
source§

impl BitXor for Value

§

type Output = Value

The resulting type after applying the ^ operator.
source§

fn bitxor(self, rhs: Self) -> Value

Performs the ^ operation. Read more
source§

impl Clone for Value

source§

fn clone(&self) -> Value

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Value

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Value

source§

fn default() -> Value

Returns the “default value” for a type. Read more
source§

impl Display for Value

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Not for Value

§

type Output = Value

The resulting type after applying the ! operator.
source§

fn not(self) -> Value

Performs the unary ! operation. Read more
source§

impl Register for Value

source§

const BITS: u8 = 64u8

source§

const SHIFT_MASK: u8 = 63u8

source§

fn zero() -> Value

source§

fn one() -> Value

source§

fn min_value() -> Value

source§

fn max_value() -> Value

source§

fn eq(&self, other: &Value) -> Value

source§

fn lt(&self, other: &Value) -> Value

source§

fn lt_s(&self, other: &Value) -> Value

source§

fn logical_not(&self) -> Value

source§

fn cond(&self, true_value: &Value, false_value: &Value) -> Value

source§

fn overflowing_add(&self, rhs: &Value) -> Value

source§

fn overflowing_sub(&self, rhs: &Value) -> Value

source§

fn overflowing_mul(&self, rhs: &Value) -> Value

source§

fn overflowing_div(&self, rhs: &Value) -> Value

source§

fn overflowing_rem(&self, rhs: &Value) -> Value

source§

fn overflowing_div_signed(&self, rhs: &Value) -> Value

source§

fn overflowing_rem_signed(&self, rhs: &Value) -> Value

source§

fn overflowing_mul_high_signed(&self, rhs: &Value) -> Value

source§

fn overflowing_mul_high_unsigned(&self, rhs: &Value) -> Value

source§

fn overflowing_mul_high_signed_unsigned(&self, rhs: &Value) -> Value

source§

fn clz(&self) -> Value

source§

fn ctz(&self) -> Value

source§

fn cpop(&self) -> Value

source§

fn clmul(&self, rhs: &Value) -> Value

source§

fn clmulh(&self, rhs: &Value) -> Value

source§

fn clmulr(&self, rhs: &Value) -> Value

source§

fn orcb(&self) -> Self

source§

fn rev8(&self) -> Self

source§

fn rol(&self, rhs: &Value) -> Value

source§

fn ror(&self, rhs: &Value) -> Value

source§

fn signed_shl(&self, rhs: &Value) -> Value

source§

fn signed_shr(&self, rhs: &Value) -> Value

source§

fn zero_extend(&self, start_bit: &Value) -> Value

source§

fn sign_extend(&self, start_bit: &Value) -> Value

source§

fn to_i8(&self) -> i8

source§

fn to_i16(&self) -> i16

source§

fn to_i32(&self) -> i32

source§

fn to_i64(&self) -> i64

source§

fn to_u8(&self) -> u8

source§

fn to_u16(&self) -> u16

source§

fn to_u32(&self) -> u32

source§

fn to_u64(&self) -> u64

source§

fn from_i8(v: i8) -> Value

source§

fn from_i16(v: i16) -> Value

source§

fn from_i32(v: i32) -> Value

source§

fn from_i64(v: i64) -> Value

source§

fn from_u8(v: u8) -> Value

source§

fn from_u16(v: u16) -> Value

source§

fn from_u32(v: u32) -> Value

source§

fn from_u64(v: u64) -> Value

source§

fn ne(&self, rhs: &Self) -> Self

source§

fn ge(&self, other: &Self) -> Self

source§

fn ge_s(&self, other: &Self) -> Self

source§

impl Shl for Value

§

type Output = Value

The resulting type after applying the << operator.
source§

fn shl(self, rhs: Self) -> Value

Performs the << operation. Read more
source§

impl Shr for Value

§

type Output = Value

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: Self) -> Value

Performs the >> operation. Read more

Auto Trait Implementations§

§

impl Freeze for Value

§

impl RefUnwindSafe for Value

§

impl !Send for Value

§

impl !Sync for Value

§

impl Unpin for Value

§

impl UnwindSafe for Value

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.