Skip to main content

Module defs

Module defs 

Expand description

Typed references: a workflow type, signal, query or update named once, as a const, with the types of what it carries.

use fusee::{Query, Signal, Update, WorkflowRef};

pub const CHECKOUT: WorkflowRef<u64, String> = WorkflowRef::new("checkout");
pub const REVIEW: Signal<bool> = Signal::new("review");
pub const STATUS: Query<(), String> = Query::new("status");
pub const APPROVE: Update<u32, bool> = Update::new("approve");

A plain &str works wherever a reference does (for calls across languages); the types then come from the call.

Structs§

Op
An operation with options O, set by its builder methods, that runs when awaited: ctx.step("charge", f).retry(policy).await.
Query
A query’s name, argument and answer types.
Signal
A signal’s name and payload type.
Update
An update’s name, argument and result types.
WorkflowRef
A workflow type: its name, the version a start runs (the newest registered unless set), its input and its result.

Traits§

AsQuery
Anything that names a query taking A and answering R.
AsSignal
Anything that names a signal carrying T: a Signal<T> or a string.
AsUpdate
Anything that names an update taking A and answering R.
AsWorkflow
Anything that names a workflow type with input I and result O: a WorkflowRef or a string.
Make
Builds an operation’s future from its options, when it is first polled: what lets an operation take its options by builder methods and still compile to one future, with nothing boxed.
NamesWorkflow
Anything that names a workflow type with input I, whatever its result (for starts that do not wait for it).