pub trait HasInitContext<Error: Default = ()>: HasCommonData {
    type InitData;

    // Required methods
    fn open(data: Self::InitData) -> Self;
    fn init_origin(&self) -> AccountAddress;
}
Expand description

Types which can act as init contexts.

§Deprecation notice

This trait is deprecated along with crate::test_infrastructure.

Use InitContext instead unless you intend to use the deprecated test infrastructure.

See the crate documentation for more details.

Required Associated Types§

source

type InitData

Data needed to open the context.

Required Methods§

source

fn open(data: Self::InitData) -> Self

Open the init context for reading and accessing values.

source

fn init_origin(&self) -> AccountAddress

Who invoked this init call.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl HasInitContext for ExternContext<ExternInitContext>

§Trait implementations for the init context

§

type InitData = ()

source§

impl<'a> HasInitContext for TestInitContext<'a>

§

type InitData = ()