bee_ledger_types/
consumed_output.rs1use bee_block::payload::{milestone::MilestoneIndex, transaction::TransactionId};
5
6#[derive(Clone, Debug, Eq, PartialEq, packable::Packable)]
8pub struct ConsumedOutput {
9 target: TransactionId,
10 milestone_index: MilestoneIndex,
11 milestone_timestamp: u32,
12}
13
14impl ConsumedOutput {
15 pub fn new(target: TransactionId, milestone_index: MilestoneIndex, milestone_timestamp: u32) -> Self {
17 Self {
18 target,
19 milestone_index,
20 milestone_timestamp,
21 }
22 }
23
24 pub fn target(&self) -> &TransactionId {
26 &self.target
27 }
28
29 pub fn milestone_index(&self) -> MilestoneIndex {
31 self.milestone_index
32 }
33
34 pub fn milestone_timestamp(&self) -> u32 {
36 self.milestone_timestamp
37 }
38}