pub struct CandyMachineData {
    pub items_available: u64,
    pub symbol: String,
    pub seller_fee_basis_points: u16,
    pub max_supply: u64,
    pub is_mutable: bool,
    pub creators: Vec<Creator>,
    pub config_line_settings: Option<ConfigLineSettings>,
    pub hidden_settings: Option<HiddenSettings>,
}
Expand description

Candy machine configuration data.

Fields§

§items_available: u64

Number of assets available

§symbol: String

Symbol for the asset

§seller_fee_basis_points: u16

Secondary sales royalty basis points (0-10000)

§max_supply: u64

Max supply of each individual asset (default 0)

§is_mutable: bool

Indicates if the asset is mutable or not (default yes)

§creators: Vec<Creator>

List of creators

§config_line_settings: Option<ConfigLineSettings>

Config line settings

§hidden_settings: Option<HiddenSettings>

Hidden setttings

Implementations§

source§

impl CandyMachineData

source

pub fn get_space_for_candy(&self) -> Result<usize>

source

pub fn get_config_line_size(&self) -> usize

source

pub fn validate(&self) -> Result<()>

Validates the hidden and config lines settings against the maximum allowed values for name and URI.

Hidden settings take precedence over config lines since when hidden settings are used, the account does not need to include space for config lines.

Trait Implementations§

source§

impl BorshDeserialize for CandyMachineData
where u64: BorshDeserialize, String: BorshDeserialize, u16: BorshDeserialize, bool: BorshDeserialize, Vec<Creator>: BorshDeserialize, Option<ConfigLineSettings>: BorshDeserialize, Option<HiddenSettings>: BorshDeserialize,

source§

fn deserialize_reader<R: Read>(reader: &mut R) -> 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.
§

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 CandyMachineData
where u64: BorshSerialize, String: BorshSerialize, u16: BorshSerialize, bool: BorshSerialize, Vec<Creator>: BorshSerialize, Option<ConfigLineSettings>: BorshSerialize, Option<HiddenSettings>: BorshSerialize,

source§

fn serialize<W: Write>(&self, writer: &mut W) -> Result<(), Error>

§

fn try_to_vec(&self) -> Result<Vec<u8>, Error>

Serialize this instance into a vector of bytes.
source§

impl Clone for CandyMachineData

source§

fn clone(&self) -> CandyMachineData

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CandyMachineData

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for CandyMachineData

source§

fn default() -> CandyMachineData

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> AbiExample for T

§

default fn example() -> T

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V