#[cfg(all(not(target_arch = "wasm32"), feature = "unit-testing"))]
pub use near_vm_runner::logic::types::{PromiseResult as VmPromiseResult, ReturnData};
#[derive(Debug, Eq, PartialEq, PartialOrd, Ord, Hash, Copy, Clone)]
pub struct PromiseIndex(pub(crate) u64);
#[deprecated(since = "4.1.0", note = "type not used within SDK, use u64 directly or another alias")]
pub type ReceiptIndex = u64;
#[deprecated(since = "4.1.0", note = "type not used within SDK, use u64 directly or another alias")]
pub type IteratorIndex = u64;
#[derive(Debug, PartialEq, Eq)]
pub enum PromiseResult {
Successful(Vec<u8>),
Failed,
}
#[cfg(all(not(target_arch = "wasm32"), feature = "unit-testing"))]
impl From<PromiseResult> for VmPromiseResult {
fn from(p: PromiseResult) -> Self {
match p {
PromiseResult::Successful(v) => Self::Successful(v),
PromiseResult::Failed => Self::Failed,
}
}
}
#[non_exhaustive]
#[derive(Debug, PartialEq, Eq)]
pub enum PromiseError {
Failed,
}