Struct mpl_token_metadata::state::ReservationListV2
source · [−]#[repr(C)]pub struct ReservationListV2 {
pub key: Key,
pub master_edition: Pubkey,
pub supply_snapshot: Option<u64>,
pub reservations: Vec<Reservation>,
pub total_reservation_spots: u64,
pub current_reservation_spots: u64,
}
Fields
key: Key
master_edition: Pubkey
Present for reverse lookups
supply_snapshot: Option<u64>
What supply counter was on master_edition when this reservation was created.
reservations: Vec<Reservation>
total_reservation_spots: u64
How many reservations there are going to be, given on first set_reservation call
current_reservation_spots: u64
Cached count of reservation spots in the reservation vec to save on CPU.
Trait Implementations
sourceimpl BorshDeserialize for ReservationListV2 where
Key: BorshDeserialize,
Pubkey: BorshDeserialize,
Option<u64>: BorshDeserialize,
Vec<Reservation>: BorshDeserialize,
u64: BorshDeserialize,
u64: BorshDeserialize,
impl BorshDeserialize for ReservationListV2 where
Key: BorshDeserialize,
Pubkey: BorshDeserialize,
Option<u64>: BorshDeserialize,
Vec<Reservation>: BorshDeserialize,
u64: BorshDeserialize,
u64: BorshDeserialize,
sourceimpl BorshSerialize for ReservationListV2 where
Key: BorshSerialize,
Pubkey: BorshSerialize,
Option<u64>: BorshSerialize,
Vec<Reservation>: BorshSerialize,
u64: BorshSerialize,
u64: BorshSerialize,
impl BorshSerialize for ReservationListV2 where
Key: BorshSerialize,
Pubkey: BorshSerialize,
Option<u64>: BorshSerialize,
Vec<Reservation>: BorshSerialize,
u64: BorshSerialize,
u64: BorshSerialize,
sourceimpl Clone for ReservationListV2
impl Clone for ReservationListV2
sourcefn clone(&self) -> ReservationListV2
fn clone(&self) -> ReservationListV2
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ReservationListV2
impl Debug for ReservationListV2
sourceimpl PartialEq<ReservationListV2> for ReservationListV2
impl PartialEq<ReservationListV2> for ReservationListV2
sourcefn eq(&self, other: &ReservationListV2) -> bool
fn eq(&self, other: &ReservationListV2) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourceimpl ReservationList for ReservationListV2
impl ReservationList for ReservationListV2
fn master_edition(&self) -> Pubkey
fn supply_snapshot(&self) -> Option<u64>
fn reservations(&self) -> Vec<Reservation>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
fn set_master_edition(&mut self, key: Pubkey)
fn set_supply_snapshot(&mut self, supply: Option<u64>)
fn add_reservation(
&mut self,
reservation: Reservation,
offset: u64,
total_spot_offset: u64
) -> ProgramResult
fn set_reservations(&mut self, reservations: Vec<Reservation>) -> ProgramResult
fn save(&self, account: &AccountInfo<'_>) -> ProgramResult
fn total_reservation_spots(&self) -> u64
fn set_total_reservation_spots(&mut self, total_reservation_spots: u64)
fn current_reservation_spots(&self) -> u64
fn set_current_reservation_spots(&mut self, current_reservation_spots: u64)
sourceimpl TokenMetadataAccount for ReservationListV2
impl TokenMetadataAccount for ReservationListV2
fn key() -> Key
fn size() -> usize
fn pad_length(buf: &mut Vec<u8>) -> Result<(), MetadataError>
fn safe_deserialize<T: BorshDeserialize>(data: &[u8]) -> Result<T, BorshError>
fn from_account_info<T: BorshDeserialize>(
a: &AccountInfo<'_>
) -> Result<T, ProgramError>
impl Eq for ReservationListV2
impl StructuralEq for ReservationListV2
impl StructuralPartialEq for ReservationListV2
Auto Trait Implementations
impl RefUnwindSafe for ReservationListV2
impl Send for ReservationListV2
impl Sync for ReservationListV2
impl Unpin for ReservationListV2
impl UnwindSafe for ReservationListV2
Blanket Implementations
impl<T> AbiExample for T
impl<T> AbiExample for T
default fn example() -> T
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more