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>
impl<Price, BlockNumber, CollectionId> CollectionConfig<Price, BlockNumber, CollectionId>
pub fn is_setting_enabled(&self, setting: CollectionSetting) -> bool
pub fn has_disabled_setting(&self, setting: CollectionSetting) -> bool
pub fn enable_setting(&mut self, setting: CollectionSetting)
pub fn disable_setting(&mut self, setting: CollectionSetting)
Trait Implementations
Source§impl<Price: Clone, BlockNumber: Clone, CollectionId: Clone> Clone for CollectionConfig<Price, BlockNumber, CollectionId>
impl<Price: Clone, BlockNumber: Clone, CollectionId: Clone> Clone for CollectionConfig<Price, BlockNumber, CollectionId>
Source§fn clone(&self) -> CollectionConfig<Price, BlockNumber, CollectionId>
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)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<Price, BlockNumber, CollectionId> Debug for CollectionConfig<Price, BlockNumber, CollectionId>
impl<Price, BlockNumber, CollectionId> Debug for CollectionConfig<Price, BlockNumber, CollectionId>
Source§impl<Price, BlockNumber, CollectionId> Decode for CollectionConfig<Price, BlockNumber, CollectionId>where
MintSettings<Price, BlockNumber, CollectionId>: Decode,
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>
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,
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,
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>
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>
impl<Price: Default, BlockNumber: Default, CollectionId: Default> Default for CollectionConfig<Price, BlockNumber, CollectionId>
Source§fn default() -> CollectionConfig<Price, BlockNumber, CollectionId>
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,
impl<Price, BlockNumber, CollectionId> Encode for CollectionConfig<Price, BlockNumber, CollectionId>where
MintSettings<Price, BlockNumber, CollectionId>: Encode,
Source§fn size_hint(&self) -> usize
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,
)
fn encode_to<__CodecOutputEdqy: Output + ?Sized>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy, )
Convert self to a slice and append it to the destination.
§fn using_encoded<R, F>(&self, f: F) -> R
fn using_encoded<R, F>(&self, f: F) -> R
Convert self to a slice and then invoke the given closure with it.
§fn encoded_size(&self) -> usize
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,
impl<Price, BlockNumber, CollectionId> MaxEncodedLen for CollectionConfig<Price, BlockNumber, CollectionId>where
MintSettings<Price, BlockNumber, CollectionId>: MaxEncodedLen,
Source§fn max_encoded_len() -> usize
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>
impl<Price: PartialEq, BlockNumber: PartialEq, CollectionId: PartialEq> PartialEq for CollectionConfig<Price, BlockNumber, CollectionId>
Source§fn eq(&self, other: &CollectionConfig<Price, BlockNumber, CollectionId>) -> bool
fn eq(&self, other: &CollectionConfig<Price, BlockNumber, CollectionId>) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.