Expand description
Canonical “unstructured” text/binary carriers.
Unstructured text/binary fields are represented as a role-marked
variant { inline, url } wrapper (or, accepted on input, a bare Text /
Binary rich scalar). This module is the single home for building,
detecting, and decoding that canonical shape.
Structs§
- Unstructured
Error - Error produced while building, detecting, or decoding a canonical unstructured text/binary carrier.
Enums§
- Unstructured
Kind - Which flavour of unstructured wrapper a type is, together with the inline case’s restrictions.
- Unstructured
Output - A decoded unstructured output value, classified against its schema.
- Unstructured
Payload Kind - Which flavour of unstructured payload a type is, irrespective of whether it
is carried by a canonical
variant { inline, url }wrapper or a bareText/Binaryrich scalar. - Unstructured
Value Case - The selected case of a canonical unstructured
variant { inline, url }value.
Constants§
- INLINE_
CASE - URL_
CASE - The case index of the
urlalternative in the canonical variant.
Functions§
- binary_
body_ restrictions - Read the binary restrictions from a request/response body root that is
known to carry unstructured binary — either the canonical
variant { inline, url }wrapper or a bareBinaryrich scalar. - decode_
unstructured_ output - Decode an unstructured output value against its schema
ty, accepting both the canonicalvariant { inline, url }wrapper and a bareText/Binaryrich scalar, and validating that the runtimevaluematches the declared schema kind. - decode_
unstructured_ value - Interpret a
SchemaValueas a canonical unstructuredvariant { inline, url }value, returning the selected case. - is_
unstructured_ variant - Whether
tyis itself a role-marked unstructured-text/binary variant. - text_
body_ restrictions - Read the text restrictions from a request/response body root that is known
to carry unstructured text — either the canonical
variant { inline, url }wrapper or a bareTextrich scalar. - unstructured_
binary_ restrictions - If
ty(resolved againstgraph) is the canonical role-marked unstructured-binary variant, return the inline binary restrictions. - unstructured_
binary_ schema_ type - Build the canonical role-marked unstructured-binary variant
variant { inline: binary<restrictions>, url: url } with Role::UnstructuredBinary. - unstructured_
inline_ value - Build a canonical unstructured
inlinevalue (case 0) wrapping the innertext/binaryvalue payload. - unstructured_
kind - If
ty(resolved againstgraph) is a canonical role-marked unstructured variant, classify it as text or binary and return the inline restrictions. - unstructured_
or_ raw_ kind - Classify
ty(resolved againstgraph) as an unstructured text/binary payload — either a canonicalvariant { inline, url }wrapper or a bareText/Binaryrich scalar — returning which flavour, orNone. - unstructured_
text_ restrictions - If
ty(resolved againstgraph) is the canonical role-marked unstructured-text variant, return the inline text restrictions. - unstructured_
text_ schema_ type - Build the canonical role-marked unstructured-text variant
variant { inline: text<restrictions>, url: url } with Role::UnstructuredText. - unstructured_
url_ value - Build a canonical unstructured
urlvalue (case 1). - wrap_
unstructured_ inline_ for_ schema - Wrap a raw
text/binaryvalue as the canonical unstructuredinlinecase (case 0) whenty(resolved againstgraph) is an unstructuredvariant { inline, url }wrapper; otherwise return the raw value unchanged (for a bareText/Binaryrich scalar).