pub struct Cep95HostRef { /* private fields */ }Expand description
Cep95 Host Ref.
Implementations§
Source§impl Cep95HostRef
impl Cep95HostRef
Sourcepub fn try_name(&self) -> OdraResult<String>
pub fn try_name(&self) -> OdraResult<String>
Does not fail in case of error, returns odra::OdraResult instead.
Sourcepub fn try_symbol(&self) -> OdraResult<String>
pub fn try_symbol(&self) -> OdraResult<String>
Does not fail in case of error, returns odra::OdraResult instead.
Sourcepub fn try_balance_of(&self, owner: Address) -> OdraResult<U256>
pub fn try_balance_of(&self, owner: Address) -> OdraResult<U256>
Does not fail in case of error, returns odra::OdraResult instead.
Sourcepub fn try_owner_of(&self, token_id: U256) -> OdraResult<Option<Address>>
pub fn try_owner_of(&self, token_id: U256) -> OdraResult<Option<Address>>
Does not fail in case of error, returns odra::OdraResult instead.
Sourcepub fn try_safe_transfer_from(
&mut self,
from: Address,
to: Address,
token_id: U256,
data: Option<Bytes>,
) -> OdraResult<()>
pub fn try_safe_transfer_from( &mut self, from: Address, to: Address, token_id: U256, data: Option<Bytes>, ) -> OdraResult<()>
Does not fail in case of error, returns odra::OdraResult instead.
Sourcepub fn try_transfer_from(
&mut self,
from: Address,
to: Address,
token_id: U256,
) -> OdraResult<()>
pub fn try_transfer_from( &mut self, from: Address, to: Address, token_id: U256, ) -> OdraResult<()>
Does not fail in case of error, returns odra::OdraResult instead.
Sourcepub fn try_approve(
&mut self,
spender: Address,
token_id: U256,
) -> OdraResult<()>
pub fn try_approve( &mut self, spender: Address, token_id: U256, ) -> OdraResult<()>
Does not fail in case of error, returns odra::OdraResult instead.
Sourcepub fn try_revoke_approval(&mut self, token_id: U256) -> OdraResult<()>
pub fn try_revoke_approval(&mut self, token_id: U256) -> OdraResult<()>
Does not fail in case of error, returns odra::OdraResult instead.
Sourcepub fn try_approved_for(&self, token_id: U256) -> OdraResult<Option<Address>>
pub fn try_approved_for(&self, token_id: U256) -> OdraResult<Option<Address>>
Does not fail in case of error, returns odra::OdraResult instead.
Sourcepub fn try_approve_for_all(&mut self, operator: Address) -> OdraResult<()>
pub fn try_approve_for_all(&mut self, operator: Address) -> OdraResult<()>
Does not fail in case of error, returns odra::OdraResult instead.
Sourcepub fn try_revoke_approval_for_all(
&mut self,
operator: Address,
) -> OdraResult<()>
pub fn try_revoke_approval_for_all( &mut self, operator: Address, ) -> OdraResult<()>
Does not fail in case of error, returns odra::OdraResult instead.
Sourcepub fn try_is_approved_for_all(
&self,
owner: Address,
operator: Address,
) -> OdraResult<bool>
pub fn try_is_approved_for_all( &self, owner: Address, operator: Address, ) -> OdraResult<bool>
Does not fail in case of error, returns odra::OdraResult instead.
Sourcepub fn try_token_metadata(
&self,
token_id: U256,
) -> OdraResult<Vec<(String, String)>>
pub fn try_token_metadata( &self, token_id: U256, ) -> OdraResult<Vec<(String, String)>>
Does not fail in case of error, returns odra::OdraResult instead.
Trait Implementations§
Source§impl CEP95Interface for Cep95HostRef
impl CEP95Interface for Cep95HostRef
Source§fn symbol(&self) -> String
fn symbol(&self) -> String
Source§fn balance_of(&self, owner: Address) -> U256
fn balance_of(&self, owner: Address) -> U256
Source§fn owner_of(&self, token_id: U256) -> Option<Address>
fn owner_of(&self, token_id: U256) -> Option<Address>
Source§fn safe_transfer_from(
&mut self,
from: Address,
to: Address,
token_id: U256,
data: Option<Bytes>,
)
fn safe_transfer_from( &mut self, from: Address, to: Address, token_id: U256, data: Option<Bytes>, )
Source§fn transfer_from(&mut self, from: Address, to: Address, token_id: U256)
fn transfer_from(&mut self, from: Address, to: Address, token_id: U256)
Source§fn approve(&mut self, spender: Address, token_id: U256)
fn approve(&mut self, spender: Address, token_id: U256)
Source§fn revoke_approval(&mut self, token_id: U256)
fn revoke_approval(&mut self, token_id: U256)
Source§fn approved_for(&self, token_id: U256) -> Option<Address>
fn approved_for(&self, token_id: U256) -> Option<Address>
Source§fn approve_for_all(&mut self, operator: Address)
fn approve_for_all(&mut self, operator: Address)
Source§fn revoke_approval_for_all(&mut self, operator: Address)
fn revoke_approval_for_all(&mut self, operator: Address)
Source§impl EntryPointsCallerProvider for Cep95HostRef
impl EntryPointsCallerProvider for Cep95HostRef
Source§fn entry_points_caller(env: &HostEnv) -> EntryPointsCaller
fn entry_points_caller(env: &HostEnv) -> EntryPointsCaller
Source§impl HostRef for Cep95HostRef
impl HostRef for Cep95HostRef
Source§fn new(address: Address, env: HostEnv) -> Self
fn new(address: Address, env: HostEnv) -> Self
Source§fn with_tokens(&self, tokens: U512) -> Self
fn with_tokens(&self, tokens: U512) -> Self
Source§fn contract_address(&self) -> Address
fn contract_address(&self) -> Address
Source§fn get_event<T>(&self, index: i32) -> Result<T, EventError>where
T: FromBytes + EventInstance,
fn get_event<T>(&self, index: i32) -> Result<T, EventError>where
T: FromBytes + EventInstance,
Source§fn last_call(&self) -> ContractCallResult
fn last_call(&self) -> ContractCallResult
Auto Trait Implementations§
impl Freeze for Cep95HostRef
impl !RefUnwindSafe for Cep95HostRef
impl !Send for Cep95HostRef
impl !Sync for Cep95HostRef
impl Unpin for Cep95HostRef
impl !UnwindSafe for Cep95HostRef
Blanket Implementations§
Source§impl<T> Addressable for Twhere
T: HostRef,
impl<T> Addressable for Twhere
T: HostRef,
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
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>
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>
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