#[repr(u8)]pub enum NftOperation {
Show 13 variants
CreateCollection = 0,
Mint = 1,
MintDocument = 2,
BatchMint = 3,
Transfer = 4,
Approve = 5,
SetApprovalForAll = 6,
Burn = 7,
UpdateMetadata = 8,
TransferCollectionOwnership = 9,
UpdateCollectionConfig = 10,
LockToken = 11,
UnlockToken = 12,
}Expand description
NFT operation codes
Variants§
CreateCollection = 0
Create a new collection
Mint = 1
Mint a new token
MintDocument = 2
Mint a certified document
BatchMint = 3
Batch mint tokens
Transfer = 4
Transfer a token
Approve = 5
Approve an address for a token
SetApprovalForAll = 6
Set approval for all tokens
Burn = 7
Burn a token
UpdateMetadata = 8
Update token metadata
TransferCollectionOwnership = 9
Transfer collection ownership
UpdateCollectionConfig = 10
Update collection config
LockToken = 11
Lock a token
UnlockToken = 12
Unlock a token
Implementations§
Source§impl NftOperation
impl NftOperation
Sourcepub fn is_collection_creation(&self) -> bool
pub fn is_collection_creation(&self) -> bool
Check if this operation creates a new collection
Sourcepub fn requires_token_ownership(&self) -> bool
pub fn requires_token_ownership(&self) -> bool
Check if this operation requires token ownership
Sourcepub fn requires_collection_ownership(&self) -> bool
pub fn requires_collection_ownership(&self) -> bool
Check if this operation requires collection ownership
Trait Implementations§
Source§impl Clone for NftOperation
impl Clone for NftOperation
Source§fn clone(&self) -> NftOperation
fn clone(&self) -> NftOperation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NftOperation
impl Debug for NftOperation
Source§impl<'de> Deserialize<'de> for NftOperation
impl<'de> Deserialize<'de> for NftOperation
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for NftOperation
impl PartialEq for NftOperation
Source§fn eq(&self, other: &NftOperation) -> bool
fn eq(&self, other: &NftOperation) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for NftOperation
impl Serialize for NftOperation
impl Copy for NftOperation
impl Eq for NftOperation
impl StructuralPartialEq for NftOperation
Auto Trait Implementations§
impl Freeze for NftOperation
impl RefUnwindSafe for NftOperation
impl Send for NftOperation
impl Sync for NftOperation
impl Unpin for NftOperation
impl UnsafeUnpin for NftOperation
impl UnwindSafe for NftOperation
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