nanvm_lib/vm/bigint/index.rs
1use core::ops::Index;
2
3use crate::vm::{BigInt, ContainerWrapper, IVm};
4
5impl<A: IVm> Index<u32> for BigInt<A> {
6 type Output = u64;
7 fn index(&self, index: u32) -> &Self::Output {
8 self.item(index)
9 }
10}
11
12impl<A: IVm> ContainerWrapper for BigInt<A> {
13 type Vm = A;
14 type Internal = A::InternalBigInt;
15 fn internal(&self) -> &Self::Internal {
16 &self.0
17 }
18}