Returns the function.
The parameters of the expression, each carrying its argument as
paramValue: every assertion whose predicate decodes as a parameter
(#6.40007(id)), in the envelope's order. An assertion whose predicate
is not a parameter is skipped. A TypeScript convenience: the reference
reads parameters one at a time through object_for_parameter.
A copy with the assertion param: value added (the reference's
with_parameter); an assertion already present is not repeated.
Adds multiple parameters at once; returns a new expression.
The argument of the single param assertion (the reference's
object_for_parameter).
The argument of the single param assertion, or undefined when there
is none (the reference's optional_object_for_parameter).
The arguments of every param assertion (the reference's objects_for_parameter).
true when at least one param assertion is present.
The expression envelope: the function leaf with the parameter assertions.
StaticfromReads an expression from an envelope (the reference's
Expression::try_from((envelope, expected_function))): the subject is
extracted as a function and the envelope is kept as it is, so
assertions that are not parameters survive a round trip.
EnvelopeError Cbor with the reference's dcbor Display as its message:
invalid format when the subject is not a leaf, dcbor error: <reason> when the
leaf is not a function (dcbor error: invalid function, dcbor error: expected CBOR tag function, but got 40007), and Expected function <expected>, but found <found> (the reference's Debug renderings) when expectedFunction is given
and differs
The reference's Display: the expression's format string, quoted and
escaped (write!(f, "{:?}", self.envelope.format())); JSON.stringify
produces the same text for the characters a format string contains.
A function with its parameters: the expression envelope whose subject is the function leaf and whose assertions are the parameters (
parameter: argument), as the reference'sExpressionholds its function and envelope.Parameters are assertions, so the same parameter may appear several times (
objectsForParameterreturns every argument) and every assertion, parameter or not, survives a round trip through an envelope.