pub enum WireForm {
Show 22 variants
Int,
Decimal,
Bool,
Text,
Bytes,
Duration,
Instant,
Unit,
Never,
RunId,
CallRef,
Number,
Rest,
Option(fn() -> WireForm),
List(fn() -> WireForm),
Set(fn() -> WireForm),
Dict(fn() -> WireForm, fn() -> WireForm),
Tuple(&'static [fn() -> WireForm]),
Declared(fn() -> &'static Shape),
Param(usize),
Applied(fn() -> &'static Shape, &'static [fn() -> WireForm]),
Std {
module: &'static str,
name: &'static str,
args: &'static [fn() -> WireForm],
},
}Expand description
How a field or payload part is written, as its Rust type says: the one mapping from a Rust type to a Flow type’s shape, which a message’s codec and a toolkit’s contract both read.
Variants§
Int
flow_value::Int: a signed number, a Flow Int.
Decimal
flow_value::Decimal: a Flow Decimal.
Bool
bool: one byte, 0 or 1.
Text
String: a text.
Bytes
flow_value::Bytes: a run of bytes.
Duration
flow_value::Duration: std’s duration.Duration.
Instant
flow_value::Instant: std’s time.Instant.
Unit
(): Unit, written as nothing.
Never
std::convert::Infallible: Never, which has no values.
RunId
RunId: a text that is a run’s id, which no Flow type checks.
CallRef
CallRef: a text that is a call’s id, which no Flow type checks.
Number
u64: a number, which no Flow type writes.
Rest
Rest: every byte left in the message, unframed.
Option(fn() -> WireForm)
Option<T>, of T’s form.
List(fn() -> WireForm)
Vec<T>, a list of T’s form.
Set(fn() -> WireForm)
A set of T’s form.
Dict(fn() -> WireForm, fn() -> WireForm)
A dictionary of these key and value forms.
Tuple(&'static [fn() -> WireForm])
A tuple of these forms, in order.
Declared(fn() -> &'static Shape)
A declared type with no type parameters.
Param(usize)
The declaration’s type parameter at this position.
Applied(fn() -> &'static Shape, &'static [fn() -> WireForm])
A declared type with type parameters, applied to these arguments.
Std
A std declaration, of this module and name, applied to these
arguments: a prelude one, such as Result, has the empty module.