pub type ItemDetailsFor<T, I> = ItemDetails<<T as SystemConfig>::AccountId, DepositBalanceOf<T, I>>;
Expand description
A type alias for the details of a single item.
Aliased Type§
struct ItemDetailsFor<T, I> {
pub owner: <T as Config>::AccountId,
pub approved: Option<<T as Config>::AccountId>,
pub is_frozen: bool,
pub deposit: <<T as Config<I>>::Currency as Currency<<T as Config>::AccountId>>::Balance,
}
Fields§
§owner: <T as Config>::AccountId
The owner of this item.
approved: Option<<T as Config>::AccountId>
The approved transferrer of this item, if one is set.
is_frozen: bool
Whether the item can be transferred or not.
deposit: <<T as Config<I>>::Currency as Currency<<T as Config>::AccountId>>::Balance
The amount held in the pallet’s default account for this item. Free-hold items will have this as zero.
Trait Implementations
Source§impl<AccountId: Clone, DepositBalance: Clone> Clone for ItemDetails<AccountId, DepositBalance>
impl<AccountId: Clone, DepositBalance: Clone> Clone for ItemDetails<AccountId, DepositBalance>
Source§fn clone(&self) -> ItemDetails<AccountId, DepositBalance>
fn clone(&self) -> ItemDetails<AccountId, DepositBalance>
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<AccountId, DepositBalance> Debug for ItemDetails<AccountId, DepositBalance>
impl<AccountId, DepositBalance> Debug for ItemDetails<AccountId, DepositBalance>
Source§impl<AccountId, DepositBalance> Decode for ItemDetails<AccountId, DepositBalance>where
AccountId: Decode,
Option<AccountId>: Decode,
DepositBalance: Decode,
impl<AccountId, DepositBalance> Decode for ItemDetails<AccountId, DepositBalance>where
AccountId: Decode,
Option<AccountId>: Decode,
DepositBalance: 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<AccountId: Default, DepositBalance: Default> Default for ItemDetails<AccountId, DepositBalance>
impl<AccountId: Default, DepositBalance: Default> Default for ItemDetails<AccountId, DepositBalance>
Source§fn default() -> ItemDetails<AccountId, DepositBalance>
fn default() -> ItemDetails<AccountId, DepositBalance>
Returns the “default value” for a type. Read more
Source§impl<AccountId, DepositBalance> Encode for ItemDetails<AccountId, DepositBalance>where
AccountId: Encode,
Option<AccountId>: Encode,
DepositBalance: Encode,
impl<AccountId, DepositBalance> Encode for ItemDetails<AccountId, DepositBalance>where
AccountId: Encode,
Option<AccountId>: Encode,
DepositBalance: 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<AccountId, DepositBalance> MaxEncodedLen for ItemDetails<AccountId, DepositBalance>where
AccountId: MaxEncodedLen,
Option<AccountId>: MaxEncodedLen,
DepositBalance: MaxEncodedLen,
impl<AccountId, DepositBalance> MaxEncodedLen for ItemDetails<AccountId, DepositBalance>where
AccountId: MaxEncodedLen,
Option<AccountId>: MaxEncodedLen,
DepositBalance: 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<AccountId: PartialEq, DepositBalance: PartialEq> PartialEq for ItemDetails<AccountId, DepositBalance>
impl<AccountId: PartialEq, DepositBalance: PartialEq> PartialEq for ItemDetails<AccountId, DepositBalance>
Source§fn eq(&self, other: &ItemDetails<AccountId, DepositBalance>) -> bool
fn eq(&self, other: &ItemDetails<AccountId, DepositBalance>) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.