Jido. Action. Output
(Jido Action v3.0.0-beta.12)
View Source
Explicit envelope for successful Action outputs that are not normal maps.
Normal Action success values are map-shaped and validated by the Action's
output_schema. Use this envelope only when a successful Action must return
a raw, stream, batch, or opaque value intentionally.
Jido.Action.Output.raw("complete")
Jido.Action.Output.batch([%{id: 1}, %{id: 2}])
Jido.Action.Output.stream(Stream.map(1..3, & &1))
Jido.Action.Output.opaque(reference, meta: %{owner: "worker"})Effects are optional and separate from the output value:
{:ok, Jido.Action.Output.stream(stream)}
{:ok, Jido.Action.Output.stream(stream), requests}requests is a proper list of effects for the caller. Exec does not consume
the stream or dispatch the requests. Output metadata is data, not effects.
Summary
Functions
Builds an explicit batch output envelope.
Builds an explicit opaque output envelope.
Builds an explicit raw output envelope.
Builds an explicit stream output envelope.
Types
Functions
Builds an explicit batch output envelope.
Builds an explicit opaque output envelope.
Builds an explicit raw output envelope.
@spec stream( Enumerable.t(), keyword() ) :: t()
Builds an explicit stream output envelope.