hpl_toolkit/utils/types.rs
use anchor_lang::prelude::*;
#[cfg_attr(feature = "debug", derive(Debug))]
#[derive(AnchorSerialize, AnchorDeserialize, Clone, PartialEq)]
pub enum AddOrRemove<T: AnchorSerialize + AnchorDeserialize + Clone + PartialEq> {
Add(T),
Remove(T),
}
#[cfg_attr(feature = "debug", derive(Debug))]
#[derive(AnchorSerialize, AnchorDeserialize, Clone, PartialEq)]
pub enum DataOrHash<T: AnchorSerialize + AnchorDeserialize + Clone + PartialEq> {
Data(T),
Hash([u8; 32]),
}