Struct falcon::il::Constant
[−]
[src]
pub struct Constant { /* fields omitted */ }
A constant value for Falcon IL
Methods
impl Constant
[src]
fn new(value: u64, bits: usize) -> Constant
[src]
Create a new Constant
with the given value and bitness.
fn value(&self) -> u64
[src]
Get the value of this Constant
.
fn bits(&self) -> usize
[src]
Get the number of bits for this Constant
.
Trait Implementations
impl Clone for Constant
[src]
fn clone(&self) -> Constant
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for Constant
[src]
impl Eq for Constant
[src]
impl Hash for Constant
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Ord for Constant
[src]
fn cmp(&self, __arg_0: &Constant) -> Ordering
[src]
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.22.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.22.0[src]
Compares and returns the minimum of two values. Read more
impl PartialEq for Constant
[src]
fn eq(&self, __arg_0: &Constant) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Constant) -> bool
[src]
This method tests for !=
.
impl PartialOrd for Constant
[src]
fn partial_cmp(&self, __arg_0: &Constant) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &Constant) -> bool
[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &Constant) -> bool
[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &Constant) -> bool
[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &Constant) -> bool
[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Display for Constant
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Into<Expression> for Constant
[src]
fn into(self) -> Expression
[src]
Performs the conversion.
impl Value for Constant
[src]
fn constant(constant: Constant) -> Self
[src]
Turn an il::Constant into a representation of this Value
fn bits(&self) -> usize
[src]
Return the number of bits contained in this value
fn shl(&self, bits: usize) -> Result<Self>
[src]
Shift the value left by the given number of bits
fn shr(&self, bits: usize) -> Result<Self>
[src]
Shift the value right by the given number of bits
fn trun(&self, bits: usize) -> Result<Self>
[src]
Truncate the value to the given number of bits
fn zext(&self, bits: usize) -> Result<Self>
[src]
Zero-extend the value to the given number of bits
fn or(&self, other: &Self) -> Result<Self>
[src]
Or this value with the given value