ergotree-ir 0.22.0

ErgoTree IR, serialization
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::serialization::op_code::OpCode;

pub(crate) trait HasStaticOpCode {
    const OP_CODE: OpCode;
}

pub(crate) trait HasOpCode {
    fn op_code(&self) -> OpCode;
}

impl<T: HasStaticOpCode> HasOpCode for T {
    fn op_code(&self) -> OpCode {
        T::OP_CODE
    }
}