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.
- Workflow
Ref - 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
Aand answeringR. - AsSignal
- Anything that names a signal carrying
T: aSignal<T>or a string. - AsUpdate
- Anything that names an update taking
Aand answeringR. - AsWorkflow
- Anything that names a workflow type with input
Iand resultO: aWorkflowRefor 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.
- Names
Workflow - Anything that names a workflow type with input
I, whatever its result (for starts that do not wait for it).