Struct falcon::il::Constant [] [src]

pub struct Constant { /* fields omitted */ }

A constant value for Falcon IL

IL Constants in Falcon are backed by both rust's u64 primitive, and BigUint from the num-bigint crate. This allows modelling and simulation of instructions which must operate on values >64 bits in size. When a Constant has 64 or less bits, the u64 will be used, incurring minimal performance overhead.

The Falcon IL Expression operations are provided as methods over Constant.

Methods

impl Constant
[src]

[src]

Create a new Constant with the given value and bitness.

[src]

Create a new Constant from the given BigUint.

[src]

Crates a constant from a decimal string of the value

[src]

Create a new Constant with the given bits and a value of zero

[src]

Get the value of this Constant if it is a u64.

[src]

Get the value of this Constant if it is a BigUint.

[src]

Get the number of bits for this Constant.

[src]

Returns true if the value in this Constant is 0, false otherwise.

[src]

Returns true if the value in this constant is 1, false otherwise.

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

Trait Implementations

impl Clone for Constant
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Constant
[src]

[src]

Formats the value using the given formatter. Read more

impl Eq for Constant
[src]

impl Hash for Constant
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Ord for Constant
[src]

[src]

This method returns an Ordering between self and other. Read more

1.21.0
[src]

Compares and returns the maximum of two values. Read more

1.21.0
[src]

Compares and returns the minimum of two values. Read more

impl PartialEq for Constant
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl PartialOrd for Constant
[src]

[src]

This method returns an ordering between self and other values if one exists. Read more

[src]

This method tests less than (for self and other) and is used by the < operator. Read more

[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

[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]

[src]

Formats the value using the given formatter. Read more

impl Into<Expression> for Constant
[src]

[src]

Performs the conversion.

impl Value for Constant
[src]

[src]

Turn an il::Constant into a representation of this Value

[src]

Return the number of bits contained in this value

[src]

Shift the value left by the given number of bits

[src]

Shift the value right by the given number of bits

[src]

Truncate the value to the given number of bits

[src]

Zero-extend the value to the given number of bits

[src]

Or this value with the given value

Auto Trait Implementations

impl Send for Constant

impl Sync for Constant