instruction.rs 422 B

123456789101112131415161718192021
  1. use steel::*;
  2. #[repr(u8)]
  3. #[derive(Clone, Copy, Debug, Eq, PartialEq, TryFromPrimitive)]
  4. pub enum ReallocInstruction {
  5. Initialize = 0,
  6. Add = 1
  7. }
  8. #[repr(C)]
  9. #[derive(Clone, Copy, Debug, Pod, Zeroable)]
  10. pub struct Initialize {}
  11. #[repr(C)]
  12. #[derive(Clone, Copy, Debug, Pod, Zeroable)]
  13. pub struct Add {
  14. pub amount: [u8; 8]
  15. }
  16. instruction!(ReallocInstruction, Initialize);
  17. instruction!(ReallocInstruction, Add);