carbon-mpl-token-metadata-decoder 1.0.0

MPL Token Metadata Decoder
Documentation
//! This code was AUTOGENERATED using the Codama library.
use {
    crate::types::{Key, ReservationV1},
    solana_pubkey::Pubkey,
};

#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Debug, Clone, borsh::BorshSerialize, borsh::BorshDeserialize, PartialEq)]
pub struct ReservationListV1 {
    pub key: Key,
    pub master_edition: Pubkey,
    pub supply_snapshot: Option<u64>,
    pub reservations: Vec<ReservationV1>,
}

impl ReservationListV1 {
    pub fn decode(data: &[u8]) -> Option<Self> {
        let mut data_slice = data;

        borsh::BorshDeserialize::deserialize(&mut data_slice).ok()
    }
}