pub struct Metadata { /* private fields */ }Implementations§
Source§impl Metadata
impl Metadata
pub fn init( &mut self, base_metadata_kind: NFTMetadataKind, additional_required_metadata: Maybe<Vec<NFTMetadataKind>>, optional_metadata: Maybe<Vec<NFTMetadataKind>>, metadata_mutability: MetadataMutability, identifier_mode: NFTIdentifierMode, json_schema: String, )
pub fn get_requirements(&self) -> MetadataRequirement
pub fn get_identifier_mode(&self) -> NFTIdentifierMode
pub fn get_or_revert(&self, token_identifier: &TokenIdentifier) -> String
pub fn get_metadata_by_kind( &self, token_identifier: String, kind: &NFTMetadataKind, ) -> String
pub fn get_metadata_kind(&self) -> NFTMetadataKind
pub fn ensure_mutability(&self, error: CEP78Error)
pub fn update_or_revert(&mut self, token_metadata: &str, token_id: &String)
Trait Implementations§
Source§impl Module for Metadata
impl Module for Metadata
Source§fn new(env: Rc<ContractEnv>) -> Self
fn new(env: Rc<ContractEnv>) -> Self
Creates a new instance of the module with the given contract environment.
Source§fn env(&self) -> Rc<ContractEnv>
fn env(&self) -> Rc<ContractEnv>
Returns the contract environment associated with the module.
Source§impl SchemaErrors for Metadata
impl SchemaErrors for Metadata
Source§impl SchemaEvents for Metadata
impl SchemaEvents for Metadata
Source§fn custom_types() -> Vec<Option<CustomType>>
fn custom_types() -> Vec<Option<CustomType>>
Returns a vector of CustomTypes. Read more
Auto Trait Implementations§
impl !Freeze for Metadata
impl !RefUnwindSafe for Metadata
impl !Send for Metadata
impl !Sync for Metadata
impl Unpin for Metadata
impl !UnwindSafe for Metadata
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> 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