1 use crate::{ 2 ArrayRef, AsContext, GcRefImpl, HeapType, I31, OwnedRooted, Result, Rooted, StructRef, 3 store::StoreOpaque, 4 }; 5 6 /// Support for `eqref` disabled at compile time because the `gc` cargo feature 7 /// was not enabled. 8 pub enum EqRef {} 9 10 impl From<Rooted<StructRef>> for Rooted<EqRef> { 11 #[inline] from(s: Rooted<StructRef>) -> Self12 fn from(s: Rooted<StructRef>) -> Self { 13 match s.inner {} 14 } 15 } 16 17 impl From<OwnedRooted<StructRef>> for OwnedRooted<EqRef> { 18 #[inline] from(s: OwnedRooted<StructRef>) -> Self19 fn from(s: OwnedRooted<StructRef>) -> Self { 20 match s.inner {} 21 } 22 } 23 24 impl From<Rooted<ArrayRef>> for Rooted<EqRef> { 25 #[inline] from(s: Rooted<ArrayRef>) -> Self26 fn from(s: Rooted<ArrayRef>) -> Self { 27 match s.inner {} 28 } 29 } 30 31 impl From<OwnedRooted<ArrayRef>> for OwnedRooted<EqRef> { 32 #[inline] from(s: OwnedRooted<ArrayRef>) -> Self33 fn from(s: OwnedRooted<ArrayRef>) -> Self { 34 match s.inner {} 35 } 36 } 37 38 impl GcRefImpl for EqRef {} 39 40 impl EqRef { ty(&self, _store: impl AsContext) -> Result<HeapType>41 pub fn ty(&self, _store: impl AsContext) -> Result<HeapType> { 42 match *self {} 43 } 44 _ty(&self, _store: &StoreOpaque) -> Result<HeapType>45 pub(crate) fn _ty(&self, _store: &StoreOpaque) -> Result<HeapType> { 46 match *self {} 47 } 48 matches_ty(&self, _store: impl AsContext, _ty: &HeapType) -> Result<bool>49 pub fn matches_ty(&self, _store: impl AsContext, _ty: &HeapType) -> Result<bool> { 50 match *self {} 51 } 52 is_i31(&self, _store: impl AsContext) -> Result<bool>53 pub fn is_i31(&self, _store: impl AsContext) -> Result<bool> { 54 match *self {} 55 } 56 _is_i31(&self, _store: &StoreOpaque) -> Result<bool>57 pub(crate) fn _is_i31(&self, _store: &StoreOpaque) -> Result<bool> { 58 match *self {} 59 } 60 as_i31(&self, _store: impl AsContext) -> Result<Option<I31>>61 pub fn as_i31(&self, _store: impl AsContext) -> Result<Option<I31>> { 62 match *self {} 63 } 64 unwrap_i31(&self, _store: impl AsContext) -> Result<I31>65 pub fn unwrap_i31(&self, _store: impl AsContext) -> Result<I31> { 66 match *self {} 67 } 68 is_struct(&self, _store: impl AsContext) -> Result<bool>69 pub fn is_struct(&self, _store: impl AsContext) -> Result<bool> { 70 match *self {} 71 } 72 _is_struct(&self, _store: &StoreOpaque) -> Result<bool>73 pub(crate) fn _is_struct(&self, _store: &StoreOpaque) -> Result<bool> { 74 match *self {} 75 } 76 as_struct(&self, _store: impl AsContext) -> Result<Option<StructRef>>77 pub fn as_struct(&self, _store: impl AsContext) -> Result<Option<StructRef>> { 78 match *self {} 79 } 80 _as_struct(&self, _store: &StoreOpaque) -> Result<Option<StructRef>>81 pub(crate) fn _as_struct(&self, _store: &StoreOpaque) -> Result<Option<StructRef>> { 82 match *self {} 83 } 84 unwrap_struct(&self, _store: impl AsContext) -> Result<StructRef>85 pub fn unwrap_struct(&self, _store: impl AsContext) -> Result<StructRef> { 86 match *self {} 87 } 88 is_array(&self, _store: impl AsContext) -> Result<bool>89 pub fn is_array(&self, _store: impl AsContext) -> Result<bool> { 90 match *self {} 91 } 92 _is_array(&self, _store: &StoreOpaque) -> Result<bool>93 pub(crate) fn _is_array(&self, _store: &StoreOpaque) -> Result<bool> { 94 match *self {} 95 } 96 as_array(&self, _store: impl AsContext) -> Result<Option<ArrayRef>>97 pub fn as_array(&self, _store: impl AsContext) -> Result<Option<ArrayRef>> { 98 match *self {} 99 } 100 _as_array(&self, _store: &StoreOpaque) -> Result<Option<ArrayRef>>101 pub(crate) fn _as_array(&self, _store: &StoreOpaque) -> Result<Option<ArrayRef>> { 102 match *self {} 103 } 104 unwrap_array(&self, _store: impl AsContext) -> Result<ArrayRef>105 pub fn unwrap_array(&self, _store: impl AsContext) -> Result<ArrayRef> { 106 match *self {} 107 } 108 } 109