[][src]Struct rate_common::literal::Variable

pub struct Variable(pub u32);

A variable, encoded as 32 bit unsigned integer.

Methods

impl Variable[src]

pub fn new(value: u32) -> Variable[src]

pub fn literal(self) -> Literal[src]

Convert a variable to a positive literal.

pub fn array_size_for_variables(self) -> usize[src]

The size of an array that can contain variables up to and including self.

pub fn array_size_for_literals(self) -> usize[src]

The size of an array that can contain literals up to and including -self.literal().

Trait Implementations

impl Offset for Variable[src]

Enable as array index.

fn as_offset(&self) -> usize[src]

We simply use the variable index, so offset 0 will be generally unused.

impl Clone for Variable[src]

impl Copy for Variable[src]

impl Eq for Variable[src]

impl Ord for Variable[src]

impl PartialEq<Variable> for Variable[src]

impl PartialOrd<Variable> for Variable[src]

impl Display for Variable[src]

impl Debug for Variable[src]

Auto Trait Implementations

Blanket Implementations

impl<T> HeapSpace for T where
    T: Copy
[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for 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.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]