//! Method with non-deserializable argument type. use near_bindgen::near_bindgen; use borsh::{BorshDeserialize, BorshSerialize}; use std::collections::HashMap; use serde::{Serialize, Deserialize}; #[derive(BorshDeserialize, BorshSerialize, Eq, PartialEq, Hash, PartialOrd, Serialize, Deserialize)] enum TypeA { Var1, Var2 } #[derive(BorshDeserialize, BorshSerialize, Eq, PartialEq, Hash, PartialOrd, Serialize, Deserialize)] enum TypeB { Var1, Var2 } #[near_bindgen] #[derive(Default, BorshDeserialize, BorshSerialize)] struct Storage { map: HashMap } #[near_bindgen] impl Storage { pub fn get(&self, key: &TypeA) -> &TypeB { self.map.get(key).unwrap() } } fn main() {}