pub struct ERC721 { /* private fields */ }Expand description
ERC721 Token standardına uygun NFT yönetimi
Implementations§
Source§impl ERC721
impl ERC721
Sourcepub fn mint(&mut self, owner: String, token_id: u64) -> Result<(), String>
pub fn mint(&mut self, owner: String, token_id: u64) -> Result<(), String>
Bir token’ı mint’ler ve sahibine atar (sadece kontrat sahibi yapabilir)
Sourcepub fn transfer(
&mut self,
from: String,
to: String,
token_id: u64,
) -> Result<(), String>
pub fn transfer( &mut self, from: String, to: String, token_id: u64, ) -> Result<(), String>
Token’ı başka bir kullanıcıya transfer eder
Sourcepub fn approve(
&mut self,
owner: String,
approved: String,
token_id: u64,
) -> Result<(), String>
pub fn approve( &mut self, owner: String, approved: String, token_id: u64, ) -> Result<(), String>
Token’ı başka bir kullanıcıya transfer edebilmesi için onay verir
Sourcepub fn get_approved(&self, token_id: u64) -> Option<String>
pub fn get_approved(&self, token_id: u64) -> Option<String>
Bir token’ın kime onaylı olduğunu döner
Sourcepub fn is_approved_or_owner(&self, user: String, token_id: u64) -> bool
pub fn is_approved_or_owner(&self, user: String, token_id: u64) -> bool
Token sahibinin onaylayıp onaylamadığını kontrol eder
Sourcepub fn tokens_of_owner(&self, owner: String) -> Vec<u64>
pub fn tokens_of_owner(&self, owner: String) -> Vec<u64>
Kullanıcıya ait olan tüm token’ları listeler
Trait Implementations§
Source§impl FromWasmAbi for ERC721
impl FromWasmAbi for ERC721
Source§impl IntoWasmAbi for ERC721
impl IntoWasmAbi for ERC721
Source§impl LongRefFromWasmAbi for ERC721
impl LongRefFromWasmAbi for ERC721
Source§impl OptionFromWasmAbi for ERC721
impl OptionFromWasmAbi for ERC721
Source§impl OptionIntoWasmAbi for ERC721
impl OptionIntoWasmAbi for ERC721
Source§impl RefFromWasmAbi for ERC721
impl RefFromWasmAbi for ERC721
Source§impl RefMutFromWasmAbi for ERC721
impl RefMutFromWasmAbi for ERC721
Source§impl TryFromJsValue for ERC721
impl TryFromJsValue for ERC721
Source§impl VectorFromWasmAbi for ERC721
impl VectorFromWasmAbi for ERC721
Source§impl VectorIntoWasmAbi for ERC721
impl VectorIntoWasmAbi for ERC721
impl SupportsConstructor for ERC721
impl SupportsInstanceProperty for ERC721
impl SupportsStaticProperty for ERC721
Auto Trait Implementations§
impl Freeze for ERC721
impl RefUnwindSafe for ERC721
impl Send for ERC721
impl Sync for ERC721
impl Unpin for ERC721
impl UnwindSafe for ERC721
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> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.