Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Effects

effect FooEffect {
    a int,
    b string,
}

An effect is a specific kind of struct declaration for information sent to the application. Effects are used in emit statements in finish blocks inside command policy.

Effect field types can be any type except for opaque values, the same as for the value side of Facts. Struct fields must obey the same restriction. You can use Struct Definition Field Insertion to define the fields of an effect with a previously defined struct.

Effects delivered through the application API report the ID and recall status of the Command that emitted them. Because commands may be reevaluated after syncing and merging, effects can be issued multiple times. An application might use the command ID and recall status to filter out duplicate effects.