solana_sdk/reward_type.rs
1use std::fmt;
2
3#[derive(Debug, PartialEq, Eq, Serialize, Deserialize, AbiExample, AbiEnumVisitor, Clone, Copy)]
4pub enum RewardType {
5 Fee,
6 Rent,
7 Staking,
8 Voting,
9}
10
11impl fmt::Display for RewardType {
12 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
13 write!(
14 f,
15 "{}",
16 match self {
17 RewardType::Fee => "fee",
18 RewardType::Rent => "rent",
19 RewardType::Staking => "staking",
20 RewardType::Voting => "voting",
21 }
22 )
23 }
24}