Onelastleaf.PluginSDK.ActionResult (onelastleaf_plugin_sdk v0.1.0)

Copy Markdown View Source

A successful terminal action result.

Return a value created by string/1, boolean/1, or integer/1 from an action handler. Use with_artifacts/2 to include artifacts that the same action has already stored through Onelastleaf.PluginSDK.ActionContext.store_artifact/3.

Summary

Functions

Creates a boolean result.

Creates an integer result.

Creates a string result.

Adds stored artifacts to a result.

Types

t()

@opaque t()

Functions

boolean(value)

@spec boolean(boolean()) :: t()

Creates a boolean result.

integer(value)

@spec integer(integer()) :: t()

Creates an integer result.

string(value)

@spec string(String.t()) :: t()

Creates a string result.

with_artifacts(result, artifacts)

@spec with_artifacts(t(), [Oll.Protocol.ArtifactDescriptor.t()]) :: t()

Adds stored artifacts to a result.

Every descriptor must exactly match an artifact previously acknowledged by oll during the current action. Duplicate descriptors are rejected when the handler returns.