Expand description
What a request names: a cell URI’s <rest> (SPEC 5.3) or a call (SPEC 5.8), resolved to
one canonical reference, pinned to a function hash or not (spec-0.4.2).
§The forms /cell accepts
-
A cell URI’s rest, byte for byte (SPEC 5.3):
/cell/ecb.europa.eu/fx_rate?base=EUR&date=2024-03-15"e=USD, then optionally&fn_hash=<64 hex digits>(a pin, 5.1) and&asof=<instant>. It is parsed by the core’sparse_referenceagainst the signature of the function the pin names, or else the one the name is bound to as of that asof (or now), so every code of SPEC 5.4 is reported as it defines. -
A call (5.8), percent-encoded as any URL path is (
/cell/rates.example.org/fx_rate(%22EUR%22,%20%22USD%22,%202024-03-15)), with an optional query?asof=<instant>and nothing else: a read of the formula dialect whose arguments are literals, the callee a full name or an@aliasof the configured map, optionally pinned (name@<fn_hash>(...)). It is parsed by the formula crate’sdatumesh_formula::call::parse_callin 5.8’s order and codes, written as its cell URI and resolved as above: a call and its URI are one request.Since 0.2.2 (spec-0.5.0, 5.8, 16.3, 16.7) the call is also a method call (
N(keys).m(args), the same request as the plain readN/m(keys, args)), takes unquoted values by the position’s type, labels (N[label], through the class’slookup), theasofdefault (the call’sasof, or the mesh’s now, in the cell URI) and a bare name through the alias map. What it resolved isTarget::resolved, the answer’sresolved(5.5). A key not canonical under its normalisation isE_KEY_NORMALISATION, a malformed encodingE_KEY_ENCODING(bothbad_request). Not accepted: expressions, ranges or units (E_PARSE_URI).
An unbound name (or alias) is not_covered with E_NAME_UNBOUND
(Rejection::Error(ErrorCode::NameUnbound), which the mesh answers so); a pin no
descriptor of the mesh has is a plain not_covered (Rejection::NotCovered); a slice
marker at /cell is E_SLICE_AT_CELL.
Structs§
- Bound
- A function bound to a name as of an instant.
- Bound
Class - A class name’s binding as of an instant (spec-0.5.0, 9.7): the class hash and the flattened descriptor.
- Target
- A request resolved to its cell (or slice, at
/slice).
Enums§
- Rejection
- Why a request names no cell.
Traits§
- Bindings
- Where names are looked up: the mesh’s store (and, for names under other hosts, the cross-mesh resolver in front of it).
Functions§
- format_
pinned - The URI of a reference with its pin (core’s
format_reference). - is_call
- Whether
rest(the text after/cell/, query included, as received) is a call rather than a cell URI’s rest: its path (before the first?) has a(or a%, or starts with@, none of which a cell URI’s path (namespace and name) has. - resolve
- Resolves a request: a call or a cell URI’s rest (see the module documentation).
nowis the asof used to look the name up when the request has none.sliceallows*(and requires one). - resolve_
call - Resolves a call (SPEC 5.8).
- resolve_
uri - Resolves a cell URI’s rest.