pub struct Cep96HostRef { /* private fields */ }Expand description
Cep96 Host Ref.
Implementations§
Source§impl Cep96HostRef
impl Cep96HostRef
Sourcepub fn try_contract_name(&self) -> OdraResult<Option<String>>
pub fn try_contract_name(&self) -> OdraResult<Option<String>>
Does not fail in case of error, returns odra::OdraResult instead.
Sourcepub fn try_contract_description(&self) -> OdraResult<Option<String>>
pub fn try_contract_description(&self) -> OdraResult<Option<String>>
Does not fail in case of error, returns odra::OdraResult instead.
Sourcepub fn try_contract_icon_uri(&self) -> OdraResult<Option<String>>
pub fn try_contract_icon_uri(&self) -> OdraResult<Option<String>>
Does not fail in case of error, returns odra::OdraResult instead.
Sourcepub fn try_contract_project_uri(&self) -> OdraResult<Option<String>>
pub fn try_contract_project_uri(&self) -> OdraResult<Option<String>>
Does not fail in case of error, returns odra::OdraResult instead.
Trait Implementations§
Source§impl Cep96ContractMetadata for Cep96HostRef
impl Cep96ContractMetadata for Cep96HostRef
Source§fn contract_name(&self) -> Option<String>
fn contract_name(&self) -> Option<String>
Contract’s human-readable name.
Source§fn contract_description(&self) -> Option<String>
fn contract_description(&self) -> Option<String>
Brief description of the contract.
Source§fn contract_icon_uri(&self) -> Option<String>
fn contract_icon_uri(&self) -> Option<String>
URI pointing to the contract’s icon image.
Source§fn contract_project_uri(&self) -> Option<String>
fn contract_project_uri(&self) -> Option<String>
URI pointing to the project’s website or documentation.
Source§impl EntryPointsCallerProvider for Cep96HostRef
impl EntryPointsCallerProvider for Cep96HostRef
Source§fn entry_points_caller(env: &HostEnv) -> EntryPointsCaller
fn entry_points_caller(env: &HostEnv) -> EntryPointsCaller
Returns an EntryPointsCaller for the given host environment.
Source§impl HostRef for Cep96HostRef
impl HostRef for Cep96HostRef
Source§fn new(address: Address, env: HostEnv) -> Self
fn new(address: Address, env: HostEnv) -> Self
Creates a new host side reference to a contract.
Source§fn with_tokens(&self, tokens: U512) -> Self
fn with_tokens(&self, tokens: U512) -> Self
Creates a new host reference with attached tokens, based on the current instance. Read more
Source§fn contract_address(&self) -> Address
fn contract_address(&self) -> Address
Returns the address of the contract.
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,
Returns the n-th event emitted by the contract. Read more
Source§fn last_call(&self) -> ContractCallResult
fn last_call(&self) -> ContractCallResult
Returns a detailed information about the last call of the contract.
Auto Trait Implementations§
impl Freeze for Cep96HostRef
impl !RefUnwindSafe for Cep96HostRef
impl !Send for Cep96HostRef
impl !Sync for Cep96HostRef
impl Unpin for Cep96HostRef
impl !UnwindSafe for Cep96HostRef
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
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