stratus/eth/primitives/
slot.rs1use display_json::DebugAsJson;
2
3use crate::eth::primitives::SlotIndex;
4use crate::eth::primitives::SlotValue;
5
6#[derive(DebugAsJson, Clone, Copy, Default, PartialEq, Eq, fake::Dummy, serde::Serialize, serde::Deserialize)]
7pub struct Slot {
8 pub index: SlotIndex,
9 pub value: SlotValue,
10}
11
12impl Slot {
13 pub fn new(index: SlotIndex, value: SlotValue) -> Self {
15 Self { index, value }
16 }
17
18 pub fn new_empty(index: SlotIndex) -> Self {
20 Self {
21 index,
22 value: SlotValue::default(),
23 }
24 }
25}