pub struct Erc721TokenContractRef { /* private fields */ }Expand description
Erc721Token Contract Ref.
Trait Implementations§
Source§impl ContractRef for Erc721TokenContractRef
impl ContractRef for Erc721TokenContractRef
Source§impl OwnedErc721WithMetadata for Erc721TokenContractRef
impl OwnedErc721WithMetadata for Erc721TokenContractRef
Source§fn balance_of(&self, owner: &Address) -> U256
fn balance_of(&self, owner: &Address) -> U256
Returns the amount of tokens owned by
owner.Source§fn safe_transfer_from(&mut self, from: &Address, to: &Address, token_id: &U256)
fn safe_transfer_from(&mut self, from: &Address, to: &Address, token_id: &U256)
Safely transfers
token_id token from from to to, checking the recipient contract uses
Erc721Receiver. Read moreSource§fn safe_transfer_from_with_data(
&mut self,
from: &Address,
to: &Address,
token_id: &U256,
data: &Bytes,
)
fn safe_transfer_from_with_data( &mut self, from: &Address, to: &Address, token_id: &U256, data: &Bytes, )
Safely transfers
token_id token from from to to, checking the recipient contract uses
Erc721Receiver, passes additional data. Read moreSource§fn approve(&mut self, approved: &Option<Address>, token_id: &U256)
fn approve(&mut self, approved: &Option<Address>, token_id: &U256)
Grants permission to
approved to transfer token_id token. The approval is cleared when the token is transferred. Read moreSource§fn set_approval_for_all(&mut self, operator: &Address, approved: bool)
fn set_approval_for_all(&mut self, operator: &Address, approved: bool)
Approves or removes operator for the caller. Operators can call
transfer_from or safe_transfer_from for all
tokens owned by the caller. Read moreSource§fn get_approved(&self, token_id: &U256) -> Option<Address>
fn get_approved(&self, token_id: &U256) -> Option<Address>
Returns the address approved for
token_id token. Read moreSource§fn is_approved_for_all(&self, owner: &Address, operator: &Address) -> bool
fn is_approved_for_all(&self, owner: &Address, operator: &Address) -> bool
Returns if the
operator is allowed to manage all of the tokens of owner.Source§fn renounce_ownership(&mut self)
fn renounce_ownership(&mut self)
If the contract’s owner chooses to renounce their ownership, the contract
will no longer have an owner. This means that any functions that can only
be accessed by the owner will no longer be available. Read more
Source§fn transfer_ownership(&mut self, new_owner: &Address)
fn transfer_ownership(&mut self, new_owner: &Address)
Transfers ownership of the module to
new_owner. This function can only
be accessed by the current contract owner. Read moreSource§impl SchemaEvents for Erc721TokenContractRef
impl SchemaEvents for Erc721TokenContractRef
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 Erc721TokenContractRef
impl !RefUnwindSafe for Erc721TokenContractRef
impl !Send for Erc721TokenContractRef
impl !Sync for Erc721TokenContractRef
impl Unpin for Erc721TokenContractRef
impl !UnwindSafe for Erc721TokenContractRef
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