referrerpolicy=no-referrer-when-downgrade
pallet_nfts

Type Alias CollectionConfigFor

Source
pub type CollectionConfigFor<T, I = ()> = CollectionConfig<BalanceOf<T, I>, BlockNumberFor<T, I>, <T as Config<I>>::CollectionId>;
Expand description

A type alias for the settings configuration of a collection.

Aliased Type§

struct CollectionConfigFor<T, I = ()> {
    pub settings: CollectionSettings,
    pub max_supply: Option<u32>,
    pub mint_settings: MintSettings<<<T as Config<I>>::Currency as Currency<<T as Config>::AccountId>>::Balance, <<T as Config<I>>::BlockNumberProvider as BlockNumberProvider>::BlockNumber, <T as Config<I>>::CollectionId>,
}

Fields§

§settings: CollectionSettings

Collection’s settings.

§max_supply: Option<u32>

Collection’s max supply.

§mint_settings: MintSettings<<<T as Config<I>>::Currency as Currency<<T as Config>::AccountId>>::Balance, <<T as Config<I>>::BlockNumberProvider as BlockNumberProvider>::BlockNumber, <T as Config<I>>::CollectionId>

Default settings each item will get during the mint.

Implementations

Source§

impl<Price, BlockNumber, CollectionId> CollectionConfig<Price, BlockNumber, CollectionId>

Source

pub fn is_setting_enabled(&self, setting: CollectionSetting) -> bool

Source

pub fn has_disabled_setting(&self, setting: CollectionSetting) -> bool

Source

pub fn enable_setting(&mut self, setting: CollectionSetting)

Source

pub fn disable_setting(&mut self, setting: CollectionSetting)

Trait Implementations

Source§

impl<Price: Clone, BlockNumber: Clone, CollectionId: Clone> Clone for CollectionConfig<Price, BlockNumber, CollectionId>

Source§

fn clone(&self) -> CollectionConfig<Price, BlockNumber, CollectionId>

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<Price, BlockNumber, CollectionId> Debug for CollectionConfig<Price, BlockNumber, CollectionId>
where Price: Debug, BlockNumber: Debug, CollectionId: Debug,

Source§

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

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

impl<Price, BlockNumber, CollectionId> Decode for CollectionConfig<Price, BlockNumber, CollectionId>
where MintSettings<Price, BlockNumber, CollectionId>: Decode,

Source§

fn decode<__CodecInputEdqy: Input>( __codec_input_edqy: &mut __CodecInputEdqy, ) -> Result<Self, Error>

Attempt to deserialise the value from input.
§

fn decode_into<I>( input: &mut I, dst: &mut MaybeUninit<Self>, ) -> Result<DecodeFinished, Error>
where I: Input,

Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
§

fn skip<I>(input: &mut I) -> Result<(), Error>
where I: Input,

Attempt to skip the encoded value from input. Read more
§

fn encoded_fixed_size() -> Option<usize>

Returns the fixed encoded size of the type. Read more
Source§

impl<Price: Default, BlockNumber: Default, CollectionId: Default> Default for CollectionConfig<Price, BlockNumber, CollectionId>

Source§

fn default() -> CollectionConfig<Price, BlockNumber, CollectionId>

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

impl<Price, BlockNumber, CollectionId> Encode for CollectionConfig<Price, BlockNumber, CollectionId>
where MintSettings<Price, BlockNumber, CollectionId>: Encode,

Source§

fn size_hint(&self) -> usize

If possible give a hint of expected size of the encoding. Read more
Source§

fn encode_to<__CodecOutputEdqy: Output + ?Sized>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy, )

Convert self to a slice and append it to the destination.
§

fn encode(&self) -> Vec<u8>

Convert self to an owned vector.
§

fn using_encoded<R, F>(&self, f: F) -> R
where F: FnOnce(&[u8]) -> R,

Convert self to a slice and then invoke the given closure with it.
§

fn encoded_size(&self) -> usize

Calculates the encoded size. Read more
Source§

impl<Price, BlockNumber, CollectionId> MaxEncodedLen for CollectionConfig<Price, BlockNumber, CollectionId>
where MintSettings<Price, BlockNumber, CollectionId>: MaxEncodedLen,

Source§

fn max_encoded_len() -> usize

Upper bound, in bytes, of the maximum encoded size of this item.
Source§

impl<Price: PartialEq, BlockNumber: PartialEq, CollectionId: PartialEq> PartialEq for CollectionConfig<Price, BlockNumber, CollectionId>

Source§

fn eq(&self, other: &CollectionConfig<Price, BlockNumber, CollectionId>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<Price, BlockNumber, CollectionId> TypeInfo for CollectionConfig<Price, BlockNumber, CollectionId>
where MintSettings<Price, BlockNumber, CollectionId>: TypeInfo + 'static, Price: TypeInfo + 'static, BlockNumber: TypeInfo + 'static, CollectionId: TypeInfo + 'static,

Source§

type Identity = CollectionConfig<Price, BlockNumber, CollectionId>

The type identifying for which type info is provided. Read more
Source§

fn type_info() -> Type

Returns the static type identifier for Self.
Source§

impl<Price: Copy, BlockNumber: Copy, CollectionId: Copy> Copy for CollectionConfig<Price, BlockNumber, CollectionId>

Source§

impl<Price, BlockNumber, CollectionId> DecodeWithMemTracking for CollectionConfig<Price, BlockNumber, CollectionId>
where MintSettings<Price, BlockNumber, CollectionId>: DecodeWithMemTracking,

Source§

impl<Price, BlockNumber, CollectionId> EncodeLike for CollectionConfig<Price, BlockNumber, CollectionId>
where MintSettings<Price, BlockNumber, CollectionId>: Encode,

Source§

impl<Price, BlockNumber, CollectionId> StructuralPartialEq for CollectionConfig<Price, BlockNumber, CollectionId>