1 use crate::{ 2 ArrayType, AsContext, AsContextMut, GcRefImpl, Result, Val, 3 store::{StoreContextMut, StoreOpaque}, 4 }; 5 6 /// Support for `ArrayRefPre` disabled at compile time because the `gc` cargo 7 /// feature was not enabled. 8 pub enum ArrayRefPre {} 9 10 /// Support for `arrayref` disabled at compile time because the `gc` cargo feature 11 /// was not enabled. 12 pub enum ArrayRef {} 13 14 impl GcRefImpl for ArrayRef {} 15 16 impl ArrayRef { ty(&self, _store: impl AsContext) -> Result<ArrayType>17 pub fn ty(&self, _store: impl AsContext) -> Result<ArrayType> { 18 match *self {} 19 } 20 matches_ty(&self, _store: impl AsContext, _ty: &ArrayType) -> Result<bool>21 pub fn matches_ty(&self, _store: impl AsContext, _ty: &ArrayType) -> Result<bool> { 22 match *self {} 23 } 24 _matches_ty(&self, _store: &StoreOpaque, _ty: &ArrayType) -> Result<bool>25 pub(crate) fn _matches_ty(&self, _store: &StoreOpaque, _ty: &ArrayType) -> Result<bool> { 26 match *self {} 27 } 28 len(&self, _store: impl AsContext) -> Result<u32>29 pub fn len(&self, _store: impl AsContext) -> Result<u32> { 30 match *self {} 31 } 32 elems<'a, T: 'static>( &self, _store: impl Into<StoreContextMut<'a, T>>, ) -> Result<impl ExactSizeIterator<Item = Val> + 'a + '_>33 pub fn elems<'a, T: 'static>( 34 &self, 35 _store: impl Into<StoreContextMut<'a, T>>, 36 ) -> Result<impl ExactSizeIterator<Item = Val> + 'a + '_> { 37 match *self {} 38 Ok([].into_iter()) 39 } 40 get(&self, _store: impl AsContextMut, _index: usize) -> Result<Val>41 pub fn get(&self, _store: impl AsContextMut, _index: usize) -> Result<Val> { 42 match *self {} 43 } 44 set(&self, _store: impl AsContextMut, _index: usize, _value: Val) -> Result<()>45 pub fn set(&self, _store: impl AsContextMut, _index: usize, _value: Val) -> Result<()> { 46 match *self {} 47 } 48 } 49