# Scheme Element Access Layout ```text ┌──────────────────┐ │ │ │ │ │ │ ▼ │ (procedure "test" │ ┌─────────────────┼────────────────────┐ ▼ │ │ (arg "a_label_name" string) │ │ (arg "a_label_len" uint) │ │ ) │ │ │ │ │ │ │ │ (struct "StructNameRust" │"test" │ │ ┌───────────────────┐ └───────┘ │ │ ▼ │ │ (field "snr_name" (f/string '("a_label_name"))) │ │ ───────────────────┘ │ │ │ (field "snr_len" (f/uint '("a_label_len"))) │ ) │ │ │ path: "test"/a_label_name │ │ │ │ │ struct StructNameRust │ { │ pub snr_name: String, └──────────────────── pub snr_len: u64, } ``` Each element is searched and accessed by the `labels` which are assigned to any member of the procedure. ```text (procedure "datagram" ┌────── (arg "a_dt_lbl" uint) │ ) ▲ │ ▲ └──────────────────────────────────────────────┐ ▼ │ ▲ │ └──────────────────────────┐ │ │ │connection │ │ ┌►(procedure "selection │ │ │ │ (proc "p_sel_dt" '("datagram")) │ data │ │ ) ▲ path │ │ │ └───────────────────────────────────┐ │ │ │ │ │ │ └───────────────────────────────┐ │ │ │ (rootprocedure │ │ │ │ (proc "p_selection" '("selection")) │ │ │ ) ▲ │ │ │ │ │ │ │ └──────────────────────┐ │ │ │ │ │ │ │ (rootstruct "Selection" │ │ │ └───────► (field "sel_idx" (f/uint '("p_selection" "p_sel_dt" "a_dt_lbl"))) ) ``` An item i.e `argument` or `procdure` can be accessed by path in foreign procedure only if foreign procedure, i.e a procedure name of destination or transient, is defined as a foreign procedure of the current procedure. On the table above it is demonstrated the method at work. An access to the `argument` (with label `a_dt_lbl`) of the the procedure `"datagram"` can be accessed only if the previous procedures are in chain. In order to achieve this, a procedure defines that a specific label is assigned to a foreign proc which may appear in the payload. This specific label should be resolved into the specific procedure. A path can point to label of the procedure. In this case only specific datatype of the field can be used. For the path pointing to argument of procedure, the rules are same. For the datatypes see `syntax.md` 'Field data types' table.