ore_lst_api/
instruction.rs

1use steel::*;
2
3#[repr(u8)]
4#[derive(Clone, Copy, Debug, Eq, PartialEq, TryFromPrimitive)]
5pub enum OreLstInstruction {
6    // User
7    Compound = 1,
8    Unwrap = 2,
9    Wrap = 3,
10
11    // Admin
12    Initialize = 100,
13}
14
15#[repr(C)]
16#[derive(Clone, Copy, Debug, Pod, Zeroable)]
17pub struct Initialize {}
18
19#[repr(C)]
20#[derive(Clone, Copy, Debug, Pod, Zeroable)]
21pub struct Compound {}
22
23#[repr(C)]
24#[derive(Clone, Copy, Debug, Pod, Zeroable)]
25pub struct Unwrap {
26    pub amount: [u8; 8],
27}
28
29#[repr(C)]
30#[derive(Clone, Copy, Debug, Pod, Zeroable)]
31pub struct Wrap {
32    pub amount: [u8; 8],
33}
34
35instruction!(OreLstInstruction, Compound);
36instruction!(OreLstInstruction, Initialize);
37instruction!(OreLstInstruction, Unwrap);
38instruction!(OreLstInstruction, Wrap);