extern crate alloc;
use alloc::{string::String, vec::Vec};
use borsh::{BorshDeserialize, BorshSerialize};
use rialo_s_pubkey::Pubkey;
#[derive(Clone, Debug, PartialEq, Eq, BorshSerialize, BorshDeserialize)]
pub enum FeatureManagementInstruction {
Upsert {
name: String,
start_time: u64,
end_time: u64,
},
UpdateAuthority {
new_authority: Pubkey,
},
}
#[cfg(not(target_os = "solana"))]
impl FeatureManagementInstruction {
pub fn serialize(&self) -> Result<Vec<u8>, borsh::io::Error> {
borsh::to_vec(self)
}
pub fn deserialize(data: &[u8]) -> Result<Self, borsh::io::Error> {
borsh::from_slice(data)
}
}