Skip to main content

Module typed

Module typed 

Source
Expand description

The typed values’ string forms — one grammar for every format:

WrittenValue
@file:images/logo.png, @user:aliceValue::Ref
@bytes:iVBORw0… (base64)Value::Bytes
@@textthe plain string @text

A string that starts with @ is always one of these (or an error), in any field — so a typo in a reference is never silently plain text.

Enums§

Spelled
What a string spells.
TypedError
A string written as a typed value that isn’t one.

Functions§

classify
What s spells: a typed value if it’s written as one (@…), plain text otherwise; @@ escapes a leading @.
escape_at
s with a leading @ doubled, so it reads back as plain text.
flatten
v with its typed values as their strings (@file:x): plain values only, for a tool that knows no typed ones.
spelling
The string form of a typed value (None for the untyped ones).