Macro fadroma::implement_init[][src]

macro_rules! implement_init {
    (
        $(#[$InitMeta:meta])* [$Init:ident]
        ($deps:ident, $env:ident, $msg:ident :{ $($field:ident : $type:ty),* }) $body:block
    ) => { ... };
    (
        $(#[$InitMeta:meta])* [$_:ident]
        ($deps:ident, $env:ident, $msg:ident : $InitExt:ty ) $body:block
    ) => { ... };
}

Instatiation. Either defines or imports an InitMsg, and hooks up your init logic to it. Function body must return the initial value of State.