[][src]Trait concordium_std::HasInitContext

pub trait HasInitContext<Error: Default> where
    Self::ParamType: Read
{ type InitData; type ParamType: HasParameter; type MetadataType: HasChainMetadata; pub fn open(data: Self::InitData) -> Self;
pub fn init_origin(&self) -> AccountAddress;
pub fn parameter_cursor(&self) -> Self::ParamType;
pub fn metadata(&self) -> &Self::MetadataType; }

Types which can act as init contexts.

Associated Types

type InitData[src]

Data needed to open the context.

type ParamType: HasParameter[src]

type MetadataType: HasChainMetadata[src]

Loading content...

Required methods

pub fn open(data: Self::InitData) -> Self[src]

Open the init context for reading and accessing values.

pub fn init_origin(&self) -> AccountAddress[src]

Who invoked this init call.

pub fn parameter_cursor(&self) -> Self::ParamType[src]

Get the cursor to the parameter.

pub fn metadata(&self) -> &Self::MetadataType[src]

Get the reference to chain metadata

Loading content...

Implementors

impl HasInitContext<()> for InitContextExtern[src]

type InitData = ()

type MetadataType = ChainMetaExtern

type ParamType = Parameter

pub fn open(_: Self::InitData) -> Self[src]

Create a new init context by using an external call.

impl<'a> HasInitContext<()> for InitContextTest<'a>[src]

type InitData = ()

type MetadataType = ChainMetaTest

type ParamType = Cursor<&'a [u8]>

Loading content...