pub trait NonFungibleTokenTrait<'a, P: JsonRpcProvider>: TokenTrait<'a, P> + Send {
const OWNER_OF: &'static str = "ownerOf";
const TOKENS_OF: &'static str = "tokensOf";
const BALANCE_OF: &'static str = "balanceOf";
const TRANSFER: &'static str = "transfer";
const TOKENS: &'static str = "tokens";
const PROPERTIES: &'static str = "properties";
Show 21 methods
// Provided methods
fn balance_of<'life0, 'async_trait>(
&'life0 mut self,
owner: H160,
) -> Pin<Box<dyn Future<Output = Result<i32, ContractError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn tokens_of<'life0, 'async_trait>(
&'life0 mut self,
owner: H160,
) -> Pin<Box<dyn Future<Output = Result<NeoIterator<'_, Bytes, P>, ContractError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn transfer<'life0, 'life1, 'async_trait>(
&'life0 mut self,
from: &'life1 Account,
to: ScriptHash,
token_id: Bytes,
data: Option<ContractParameter>,
) -> Pin<Box<dyn Future<Output = Result<TransactionBuilder<'_, P>, ContractError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn transfer_inner<'life0, 'async_trait>(
&'life0 mut self,
to: ScriptHash,
token_id: Bytes,
data: Option<ContractParameter>,
) -> Pin<Box<dyn Future<Output = Result<TransactionBuilder<'_, Self::P>, ContractError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn transfer_from_name<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
from: &'life1 Account,
to: &'life2 str,
token_id: Bytes,
data: Option<ContractParameter>,
) -> Pin<Box<dyn Future<Output = Result<TransactionBuilder<'_, P>, ContractError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn transfer_to_name<'life0, 'life1, 'async_trait>(
&'life0 mut self,
to: &'life1 str,
token_id: Bytes,
data: Option<ContractParameter>,
) -> Pin<Box<dyn Future<Output = Result<TransactionBuilder<'_, P>, ContractError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn build_non_divisible_transfer_script<'life0, 'async_trait>(
&'life0 mut self,
to: Address,
token_id: Bytes,
data: ContractParameter,
) -> Pin<Box<dyn Future<Output = Result<Bytes, ContractError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn owner_of<'life0, 'async_trait>(
&'life0 mut self,
token_id: Bytes,
) -> Pin<Box<dyn Future<Output = Result<H160, ContractError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn throw_if_divisible_nft<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), ContractError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn throw_if_sender_is_not_owner<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
from: &'life1 ScriptHash,
token_id: &'life2 Bytes,
) -> Pin<Box<dyn Future<Output = Result<(), ContractError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn transfer_divisible<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
from: &'life1 Account,
to: &'life2 ScriptHash,
amount: i32,
token_id: Bytes,
data: Option<ContractParameter>,
) -> Pin<Box<dyn Future<Output = Result<TransactionBuilder<'_, P>, ContractError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn transfer_divisible_from_hashes<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
from: &'life1 ScriptHash,
to: &'life2 ScriptHash,
amount: i32,
token_id: Bytes,
data: Option<ContractParameter>,
) -> Pin<Box<dyn Future<Output = Result<TransactionBuilder<'_, P>, ContractError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn transfer_divisible_from_name<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
from: &'life1 Account,
to: &'life2 str,
amount: i32,
token_id: Bytes,
data: Option<ContractParameter>,
) -> Pin<Box<dyn Future<Output = Result<TransactionBuilder<'_, P>, ContractError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn transfer_divisible_to_name<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
from: &'life1 ScriptHash,
to: &'life2 str,
amount: i32,
token_id: Bytes,
data: Option<ContractParameter>,
) -> Pin<Box<dyn Future<Output = Result<TransactionBuilder<'_, P>, ContractError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn build_divisible_transfer_script<'life0, 'async_trait>(
&'life0 self,
from: Address,
to: Address,
amount: i32,
token_id: Bytes,
data: Option<ContractParameter>,
) -> Pin<Box<dyn Future<Output = Result<Bytes, ContractError>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn owners_of<'life0, 'async_trait>(
&'life0 mut self,
token_id: Bytes,
) -> Pin<Box<dyn Future<Output = Result<NeoIterator<'_, Address, P>, ContractError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn throw_if_non_divisible_nft<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), ContractError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn balance_of_divisible<'life0, 'async_trait>(
&'life0 mut self,
owner: H160,
token_id: Bytes,
) -> Pin<Box<dyn Future<Output = Result<i32, ContractError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn tokens<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<NeoIterator<'_, Bytes, P>, ContractError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn properties<'life0, 'async_trait>(
&'life0 mut self,
token_id: Bytes,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, String>, ContractError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn custom_properties<'life0, 'async_trait>(
&'life0 mut self,
token_id: Bytes,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, StackItem>, ContractError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}
Provided Associated Constants§
const OWNER_OF: &'static str = "ownerOf"
const TOKENS_OF: &'static str = "tokensOf"
const BALANCE_OF: &'static str = "balanceOf"
const TRANSFER: &'static str = "transfer"
const TOKENS: &'static str = "tokens"
const PROPERTIES: &'static str = "properties"
Provided Methods§
fn balance_of<'life0, 'async_trait>(
&'life0 mut self,
owner: H160,
) -> Pin<Box<dyn Future<Output = Result<i32, ContractError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn tokens_of<'life0, 'async_trait>(
&'life0 mut self,
owner: H160,
) -> Pin<Box<dyn Future<Output = Result<NeoIterator<'_, Bytes, P>, ContractError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn transfer<'life0, 'life1, 'async_trait>(
&'life0 mut self,
from: &'life1 Account,
to: ScriptHash,
token_id: Bytes,
data: Option<ContractParameter>,
) -> Pin<Box<dyn Future<Output = Result<TransactionBuilder<'_, P>, ContractError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn transfer_inner<'life0, 'async_trait>(
&'life0 mut self,
to: ScriptHash,
token_id: Bytes,
data: Option<ContractParameter>,
) -> Pin<Box<dyn Future<Output = Result<TransactionBuilder<'_, Self::P>, ContractError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn transfer_from_name<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
from: &'life1 Account,
to: &'life2 str,
token_id: Bytes,
data: Option<ContractParameter>,
) -> Pin<Box<dyn Future<Output = Result<TransactionBuilder<'_, P>, ContractError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn transfer_to_name<'life0, 'life1, 'async_trait>(
&'life0 mut self,
to: &'life1 str,
token_id: Bytes,
data: Option<ContractParameter>,
) -> Pin<Box<dyn Future<Output = Result<TransactionBuilder<'_, P>, ContractError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn build_non_divisible_transfer_script<'life0, 'async_trait>(
&'life0 mut self,
to: Address,
token_id: Bytes,
data: ContractParameter,
) -> Pin<Box<dyn Future<Output = Result<Bytes, ContractError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn owner_of<'life0, 'async_trait>(
&'life0 mut self,
token_id: Bytes,
) -> Pin<Box<dyn Future<Output = Result<H160, ContractError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn throw_if_divisible_nft<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), ContractError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn throw_if_sender_is_not_owner<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
from: &'life1 ScriptHash,
token_id: &'life2 Bytes,
) -> Pin<Box<dyn Future<Output = Result<(), ContractError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn transfer_divisible<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
from: &'life1 Account,
to: &'life2 ScriptHash,
amount: i32,
token_id: Bytes,
data: Option<ContractParameter>,
) -> Pin<Box<dyn Future<Output = Result<TransactionBuilder<'_, P>, ContractError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn transfer_divisible_from_hashes<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
from: &'life1 ScriptHash,
to: &'life2 ScriptHash,
amount: i32,
token_id: Bytes,
data: Option<ContractParameter>,
) -> Pin<Box<dyn Future<Output = Result<TransactionBuilder<'_, P>, ContractError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn transfer_divisible_from_name<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
from: &'life1 Account,
to: &'life2 str,
amount: i32,
token_id: Bytes,
data: Option<ContractParameter>,
) -> Pin<Box<dyn Future<Output = Result<TransactionBuilder<'_, P>, ContractError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn transfer_divisible_to_name<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
from: &'life1 ScriptHash,
to: &'life2 str,
amount: i32,
token_id: Bytes,
data: Option<ContractParameter>,
) -> Pin<Box<dyn Future<Output = Result<TransactionBuilder<'_, P>, ContractError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn build_divisible_transfer_script<'life0, 'async_trait>(
&'life0 self,
from: Address,
to: Address,
amount: i32,
token_id: Bytes,
data: Option<ContractParameter>,
) -> Pin<Box<dyn Future<Output = Result<Bytes, ContractError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn owners_of<'life0, 'async_trait>(
&'life0 mut self,
token_id: Bytes,
) -> Pin<Box<dyn Future<Output = Result<NeoIterator<'_, Address, P>, ContractError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn throw_if_non_divisible_nft<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), ContractError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn balance_of_divisible<'life0, 'async_trait>(
&'life0 mut self,
owner: H160,
token_id: Bytes,
) -> Pin<Box<dyn Future<Output = Result<i32, ContractError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn tokens<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<NeoIterator<'_, Bytes, P>, ContractError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn properties<'life0, 'async_trait>(
&'life0 mut self,
token_id: Bytes,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, String>, ContractError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn custom_properties<'life0, 'async_trait>(
&'life0 mut self,
token_id: Bytes,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, StackItem>, ContractError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.