Enum calc::Value [] [src]

pub enum Value {
    Dec(i64),
    Hex(i64),
    Float(f64),
}

Represents a canonical value that can be calculated by this library

Variants

An integral value in decimal form. This is generally interoperable with the Hex constructor, but will be overriden by the Hex constructor.

An integral value in hexadecimal form. This takes precedence over the Dec constructor.

A floating point number

Methods

impl Value
[src]

Represents a computation that can only operate on, and return, integer values

Represents a computation that will cast integer types to floating point

Trait Implementations

impl Clone for Value
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Value
[src]

Formats the value using the given formatter.

impl PartialEq for Value
[src]

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

This method tests for !=.

impl Display for Value
[src]

Formats the value using the given formatter. Read more

impl Add for Value
[src]

The resulting type after applying the + operator

The method for the + operator

impl Sub for Value
[src]

The resulting type after applying the - operator

The method for the - operator

impl Mul for Value
[src]

The resulting type after applying the * operator

The method for the * operator

impl Div for Value
[src]

The resulting type after applying the / operator

The method for the / operator

impl BitAnd for Value
[src]

The resulting type after applying the & operator

The method for the & operator

impl BitOr for Value
[src]

The resulting type after applying the | operator

The method for the | operator

impl BitXor for Value
[src]

The resulting type after applying the ^ operator

The method for the ^ operator

impl Neg for Value
[src]

The resulting type after applying the - operator

The method for the unary - operator

impl Not for Value
[src]

The resulting type after applying the ! operator

The method for the unary ! operator

impl Rem for Value
[src]

The resulting type after applying the % operator

The method for the % operator

impl Shl<Value> for Value
[src]

The resulting type after applying the << operator

The method for the << operator

impl Shr<Value> for Value
[src]

The resulting type after applying the >> operator

The method for the >> operator