[][src]Struct safe_index::examples::basic::VarIndex

pub struct VarIndex { /* fields omitted */ }

Index of a variable.

Methods

impl VarIndex[src]

pub fn new(val: usize) -> Self[src]

Wraps an int.

pub fn zero() -> Self[src]

Zero.

pub fn one() -> Self[src]

One.

pub fn get(&self) -> usize[src]

Accessor.

pub fn inc(&mut self)[src]

Increments the int.

pub fn dec(&mut self)[src]

Decrements the int.

impl VarIndex[src]

Important traits for VarRange
pub fn up_to(self, end: VarIndex) -> VarRange[src]

Creates a range between two indexes (upper bound is exclusive).

Trait Implementations

impl Eq for VarIndex[src]

impl Into<usize> for VarIndex[src]

impl<'a> Into<usize> for &'a VarIndex[src]

impl Clone for VarIndex[src]

impl PartialOrd<VarIndex> for VarIndex[src]

impl PartialOrd<usize> for VarIndex[src]

impl PartialEq<VarIndex> for VarIndex[src]

impl PartialEq<usize> for VarIndex[src]

impl Ord for VarIndex[src]

impl From<usize> for VarIndex[src]

impl<'a> From<&'a usize> for VarIndex[src]

impl Copy for VarIndex[src]

impl Deref for VarIndex[src]

type Target = usize

The resulting type after dereferencing.

impl Hash for VarIndex[src]

impl<T: Into<usize>> Add<T> for VarIndex[src]

type Output = VarIndex

The resulting type after applying the + operator.

impl<T: Into<usize>> AddAssign<T> for VarIndex[src]

impl<T> Index<VarIndex> for VarMap<T>[src]

type Output = T

The returned type after indexing.

impl<T> IndexMut<VarIndex> for VarMap<T>[src]

impl Display for VarIndex[src]

impl Debug for VarIndex[src]

Auto Trait Implementations

Blanket Implementations

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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