pub struct TokenAttributesMapper<SA>where
SA: StorageMapperApi,{ /* private fields */ }
Implementations§
source§impl<SA> TokenAttributesMapper<SA>where
SA: StorageMapperApi,
impl<SA> TokenAttributesMapper<SA>where
SA: StorageMapperApi,
pub fn set<T, M>( &self, token_id: &TokenIdentifier<M>, token_nonce: u64, attributes: &T )
sourcepub fn update<T, M>(
&self,
token_id: &TokenIdentifier<M>,
token_nonce: u64,
attributes: &T
)
pub fn update<T, M>( &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, M>(&self, token_id: &TokenIdentifier<M>, token_nonce: u64)
pub fn has_attributes<M>(
&self,
token_id: &TokenIdentifier<M>,
token_nonce: u64
) -> boolwhere
M: ManagedTypeApi,
pub fn has_nonce<T, M>(&self, token_id: &TokenIdentifier<M>, attr: &T) -> bool
pub fn get_attributes<T, M>( &self, token_id: &TokenIdentifier<M>, token_nonce: u64 ) -> T
pub fn get_nonce<T, M>(&self, token_id: &TokenIdentifier<M>, attr: &T) -> u64
Trait Implementations§
source§impl<SA> StorageMapper<SA> for TokenAttributesMapper<SA>where
SA: StorageMapperApi,
impl<SA> StorageMapper<SA> for TokenAttributesMapper<SA>where
SA: StorageMapperApi,
source§fn new(base_key: StorageKey<SA>) -> TokenAttributesMapper<SA>
fn new(base_key: StorageKey<SA>) -> TokenAttributesMapper<SA>
Will be called automatically by the
#[storage_mapper]
annotation generated code.Auto Trait Implementations§
impl<SA> Freeze for TokenAttributesMapper<SA>
impl<SA> RefUnwindSafe for TokenAttributesMapper<SA>
impl<SA> Send for TokenAttributesMapper<SA>
impl<SA> Sync for TokenAttributesMapper<SA>
impl<SA> Unpin for TokenAttributesMapper<SA>
impl<SA> UnwindSafe for TokenAttributesMapper<SA>
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> InterpretableFrom<T> for T
impl<T> InterpretableFrom<T> for T
fn interpret_from(from: T, _context: &InterpreterContext) -> T
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more