containers
containers
#
Descending a container type one step — the shared answer for both access families.
root.session.photo and CapturePanorama().frames[1] ask the same three
questions of a type: what is this struct's field, this array's element, this
map's entry? The path family
(...nodes.destination.access)
and its value twin
(...nodes.process.access) each
resolve their return type through here, so the rules and the error wording are
written once and the node bodies stay a line or two.
Every function takes the context naming the caller (the node kind), so a
failure reads "PathIndex: Session is not an Array".
array_element(container, context)
#
The element type of the Array container.
Raises:
| Type | Description |
|---|---|
TypeError
|
If |
Source code in capturegraph-lib/capturegraph/procedures/procedure/type_checking/containers.py
map_entry(container, key_type, context)
#
The value type of the Map container, for an entry keyed by key_type.
Raises:
| Type | Description |
|---|---|
TypeError
|
If |
Source code in capturegraph-lib/capturegraph/procedures/procedure/type_checking/containers.py
map_types(container, context)
#
The (key, value) types of the Map container.
Raises:
| Type | Description |
|---|---|
TypeError
|
If |
Source code in capturegraph-lib/capturegraph/procedures/procedure/type_checking/containers.py
path_target(source)
#
The concrete type a Procedure[Path[T]] points at, i.e. T.
Raises:
| Type | Description |
|---|---|
TypeError
|
If the source's return type is not a |
Source code in capturegraph-lib/capturegraph/procedures/procedure/type_checking/containers.py
struct_field(container, field, context)
#
The type of container's field.
Raises:
| Type | Description |
|---|---|
TypeError
|
If |