mod arithmetic;
mod bitwise;
mod block;
mod environment;
mod flow;
mod logging;
mod memory;
mod stack;
mod storage;
mod system;
use std::{
cmp::Eq as EqTrait,
fmt::{Debug, Display},
hash::Hash,
};
pub use arithmetic::*;
pub use bitwise::*;
pub use block::*;
pub use environment::*;
pub use flow::*;
pub use logging::*;
pub use memory::*;
pub use stack::*;
pub use storage::*;
pub use system::*;
use crate::opcode::OpCode;
pub trait InstructionMeta: Display + Debug + Clone + Copy + PartialEq + EqTrait + Hash {
fn opcode(&self) -> OpCode;
#[must_use]
#[inline]
fn is_push(&self) -> bool {
self.opcode().is_push()
}
#[must_use]
#[inline]
fn is_dup(&self) -> bool {
self.opcode().is_dup()
}
#[must_use]
#[inline]
fn is_swap(&self) -> bool {
self.opcode().is_swap()
}
#[must_use]
#[inline]
fn is_log(&self) -> bool {
self.opcode().is_log()
}
#[must_use]
#[inline]
fn is_terminator(&self) -> bool {
self.opcode().is_terminator()
}
}