carbon-mpl-core-decoder 1.0.0

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

#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Debug, Clone, borsh::BorshSerialize, borsh::BorshDeserialize, PartialEq)]
pub struct CollectionV1 {
    pub key: Key,
    pub update_authority: Pubkey,
    pub name: String,
    pub uri: String,
    pub num_minted: u32,
    pub current_size: u32,
}

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

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