pub struct Collection {
pub creator_group_key: Pubkey,
pub size: u32,
pub sigs: u8,
pub for_minter: bool,
pub royalty_50bps: [u8; 8],
pub symbol: Symbol,
pub name: String,
}Fields§
§creator_group_key: PubkeyPubkey of the creator group that created this collection
size: u32Number of items in the collection
sigs: u8Signatures indicating whether the collection has been signed by all creators
for_minter: boolWhether this collection will be minted via minter
royalty_50bps: [u8; 8]Royalty per creator (in half-percentages!). Half-percentages are used to be able to use a single byte (0 to 255) effectively.
§Examples
royalty_50bps_multiplier = 4
-> 4 * 0.5% = 2% royalty
royalty_50bps_multiplier = 7
-> 7 * 0.5% = 3.5% royalty
The number of nonzero entries must match the number of creators in the creator group. This should be enforced upon the initialization of a collection.
symbol: SymbolSymbol for the collection
name: StringName for the collection
Implementations§
Trait Implementations§
Source§impl AccountDeserialize for Collection
impl AccountDeserialize for Collection
Source§fn try_deserialize(buf: &mut &[u8]) -> Result<Self>
fn try_deserialize(buf: &mut &[u8]) -> Result<Self>
Deserializes previously initialized account data. Should fail for all
uninitialized accounts, where the bytes are zeroed. Implementations
should be unique to a particular account type so that one can never
successfully deserialize the data of one account type into another.
For example, if the SPL token program were to implement this trait,
it should be impossible to deserialize a
Mint account into a token
Account.Source§fn try_deserialize_unchecked(buf: &mut &[u8]) -> Result<Self>
fn try_deserialize_unchecked(buf: &mut &[u8]) -> Result<Self>
Deserializes account data without checking the account discriminator.
This should only be used on account initialization, when the bytes of
the account are zeroed.
Source§impl AccountSerialize for Collection
impl AccountSerialize for Collection
Source§impl BorshDeserialize for Collectionwhere
Pubkey: BorshDeserialize,
u32: BorshDeserialize,
u8: BorshDeserialize,
bool: BorshDeserialize,
[u8; 8]: BorshDeserialize,
Symbol: BorshDeserialize,
String: BorshDeserialize,
impl BorshDeserialize for Collectionwhere
Pubkey: BorshDeserialize,
u32: BorshDeserialize,
u8: BorshDeserialize,
bool: BorshDeserialize,
[u8; 8]: BorshDeserialize,
Symbol: BorshDeserialize,
String: BorshDeserialize,
Source§impl BorshSerialize for Collectionwhere
Pubkey: BorshSerialize,
u32: BorshSerialize,
u8: BorshSerialize,
bool: BorshSerialize,
[u8; 8]: BorshSerialize,
Symbol: BorshSerialize,
String: BorshSerialize,
impl BorshSerialize for Collectionwhere
Pubkey: BorshSerialize,
u32: BorshSerialize,
u8: BorshSerialize,
bool: BorshSerialize,
[u8; 8]: BorshSerialize,
Symbol: BorshSerialize,
String: BorshSerialize,
Source§impl Clone for Collection
impl Clone for Collection
Source§impl Debug for Collection
impl Debug for Collection
Source§impl Discriminator for Collection
impl Discriminator for Collection
const DISCRIMINATOR: [u8; 8]
fn discriminator() -> [u8; 8]
Source§impl PartialEq for Collection
impl PartialEq for Collection
impl StructuralPartialEq for Collection
Auto Trait Implementations§
impl Freeze for Collection
impl RefUnwindSafe for Collection
impl Send for Collection
impl Sync for Collection
impl Unpin for Collection
impl UnsafeUnpin for Collection
impl UnwindSafe for Collection
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more