# Trait stable_mir::ty::IndexedVal

source ·

    pub trait IndexedVal {
        // Required methods
        fn to_val(index: usize) -> Self;
        fn to_index(&self) -> usize;
    }

## Required Methods§

source

#### fn to_val(index: usize) -> Self

source

#### fn to_index(&self) -> usize

## Object Safety§

This trait is not object safe.

## Implementors§

source§

### impl IndexedVal for Layout

source§

### impl IndexedVal for DefId

source§

### impl IndexedVal for AllocId

source§

### impl IndexedVal for InstanceDef

source§

### impl IndexedVal for MirConstId

source§

### impl IndexedVal for Span

source§

### impl IndexedVal for Ty

source§

### impl IndexedVal for TyConstId

source§

### impl IndexedVal for VariantIdx