Struct concordium_std::ExternContext
source · pub struct ExternContext<T: ContextType> { /* private fields */ }
Expand description
Context backed by host functions.
Usuaully referred to via aliases InitContext
or ReceiveContext
.
Trait Implementations§
source§impl<T: Default + ContextType> Default for ExternContext<T>
impl<T: Default + ContextType> Default for ExternContext<T>
source§fn default() -> ExternContext<T>
fn default() -> ExternContext<T>
Returns the “default value” for a type. Read more
source§impl<T: ContextType> HasCommonData for ExternContext<T>
impl<T: ContextType> HasCommonData for ExternContext<T>
type MetadataType = ExternChainMeta
type ParamType = ExternParameter
type PolicyIteratorType = PoliciesIterator
type PolicyType = Policy<AttributesCursor>
source§fn metadata(&self) -> &Self::MetadataType
fn metadata(&self) -> &Self::MetadataType
Get the reference to chain metadata
source§fn policies(&self) -> PoliciesIterator ⓘ
fn policies(&self) -> PoliciesIterator ⓘ
Policies of the sender of the message.
For init methods this is the would-be creator of the contract,
for the receive this is the policies of the immediate sender. Read more
source§fn parameter_cursor(&self) -> Self::ParamType
fn parameter_cursor(&self) -> Self::ParamType
Get the cursor to the parameter.
source§impl HasInitContext for ExternContext<ExternInitContext>
impl HasInitContext for ExternContext<ExternInitContext>
§Trait implementations for the init context
source§impl HasReceiveContext for ExternContext<ExternReceiveContext>
impl HasReceiveContext for ExternContext<ExternReceiveContext>
§Trait implementations for the receive context
source§fn open(_: Self::ReceiveData) -> Self
fn open(_: Self::ReceiveData) -> Self
Create a new receive context
type ReceiveData = ()
source§fn invoker(&self) -> AccountAddress
fn invoker(&self) -> AccountAddress
Who is the account that initiated the top-level transaction this
invocation is a part of.
source§fn self_address(&self) -> ContractAddress
fn self_address(&self) -> ContractAddress
The address of the contract being invoked.
source§fn sender(&self) -> Address
fn sender(&self) -> Address
The immediate sender of the message. In general different from the
invoker.
source§fn owner(&self) -> AccountAddress
fn owner(&self) -> AccountAddress
Account which created the contract instance.
source§fn named_entrypoint(&self) -> OwnedEntrypointName
fn named_entrypoint(&self) -> OwnedEntrypointName
Get the name of the entrypoint that was named. In case a default
entrypoint is invoked this can be different from the name of the
entrypoint that is being executed.
Auto Trait Implementations§
impl<T> Freeze for ExternContext<T>
impl<T> RefUnwindSafe for ExternContext<T>where
T: RefUnwindSafe,
impl<T> Send for ExternContext<T>where
T: Send,
impl<T> Sync for ExternContext<T>where
T: Sync,
impl<T> Unpin for ExternContext<T>where
T: Unpin,
impl<T> UnwindSafe for ExternContext<T>where
T: UnwindSafe,
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