pub struct NftRecord {
pub tag: Tag,
pub nonce: u8,
pub name_account: Pubkey,
pub owner: Pubkey,
pub nft_mint: Pubkey,
}Fields§
§tag: TagTag
nonce: u8Nonce
name_account: PubkeyName account of the record
owner: PubkeyRecord owner
nft_mint: PubkeyNFT mint
Implementations§
Source§impl NftRecord
impl NftRecord
pub const SEED: &'static [u8; 10] = b"nft_record"
pub fn new( nonce: u8, owner: Pubkey, name_account: Pubkey, nft_mint: Pubkey, ) -> Self
pub fn find_key(name_account: &Pubkey, program_id: &Pubkey) -> (Pubkey, u8)
pub fn save(&self, dst: &mut [u8])
pub fn from_account_info( a: &AccountInfo<'_>, tag: Tag, ) -> Result<NftRecord, ProgramError>
pub fn is_active(&self) -> bool
Trait Implementations§
Source§impl BorshDeserialize for NftRecord
impl BorshDeserialize for NftRecord
fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self, Error>
Source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
Source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl BorshSerialize for NftRecord
impl BorshSerialize for NftRecord
Auto Trait Implementations§
impl Freeze for NftRecord
impl RefUnwindSafe for NftRecord
impl Send for NftRecord
impl Sync for NftRecord
impl Unpin for NftRecord
impl UnwindSafe for NftRecord
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more