Struct dharitri_wasm::storage::mappers::TokenAttributesMapper
source · pub struct TokenAttributesMapper<SA>{ /* private fields */ }Implementations§
source§impl<SA> TokenAttributesMapper<SA>
impl<SA> TokenAttributesMapper<SA>
pub fn set<T: TopEncode + TopDecode + NestedEncode + NestedDecode, M: ManagedTypeApi>( &self, token_id: &TokenIdentifier<M>, token_nonce: u64, attributes: &T )
sourcepub fn update<T: TopEncode + TopDecode + NestedEncode + NestedDecode, M: ManagedTypeApi>(
&self,
token_id: &TokenIdentifier<M>,
token_nonce: u64,
attributes: &T
)
pub fn update<T: TopEncode + TopDecode + NestedEncode + NestedDecode, M: ManagedTypeApi>( &self, token_id: &TokenIdentifier<M>, token_nonce: u64, attributes: &T )
Use carefully. Update should be used mainly when backed up by the protocol.
pub fn clear<T: TopEncode + TopDecode + NestedEncode + NestedDecode, M: ManagedTypeApi>( &self, token_id: &TokenIdentifier<M>, token_nonce: u64 )
pub fn has_attributes<M: ManagedTypeApi>( &self, token_id: &TokenIdentifier<M>, token_nonce: u64 ) -> bool
pub fn has_nonce<T: TopEncode + TopDecode + NestedEncode + NestedDecode, M: ManagedTypeApi>( &self, token_id: &TokenIdentifier<M>, attr: &T ) -> bool
pub fn get_attributes<T: TopEncode + TopDecode + NestedEncode + NestedDecode, M: ManagedTypeApi>( &self, token_id: &TokenIdentifier<M>, token_nonce: u64 ) -> T
pub fn get_nonce<T: TopEncode + TopDecode + NestedEncode + NestedDecode, M: ManagedTypeApi>( &self, token_id: &TokenIdentifier<M>, attr: &T ) -> u64
Trait Implementations§
source§impl<SA> StorageMapper<SA> for TokenAttributesMapper<SA>
impl<SA> StorageMapper<SA> for TokenAttributesMapper<SA>
source§fn new(api: SA, base_key: StorageKey<SA>) -> Self
fn new(api: SA, base_key: StorageKey<SA>) -> Self
Will be called automatically by the
#[storage_mapper] annotation generated code.Auto Trait Implementations§
impl<SA> RefUnwindSafe for TokenAttributesMapper<SA>where
SA: RefUnwindSafe,
impl<SA> Send for TokenAttributesMapper<SA>where
SA: Send,
impl<SA> Sync for TokenAttributesMapper<SA>where
SA: Sync,
impl<SA> Unpin for TokenAttributesMapper<SA>where
SA: Unpin,
impl<SA> UnwindSafe for TokenAttributesMapper<SA>where
SA: UnwindSafe,
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