AmlInterp.AmlValue.element: def of bend-osdev-acpi@0.1.1.0 Import: import bend-osdev-acpi@0.1.1.0/aml_interp.bend as AmlInterp Lines 462-472 of bend-osdev-acpi@0.1.1.0/aml_interp.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-acpi@0.1.1.0/aml_interp.bend&start_line=462&end_line=472 import Base import bend-osdev-bytes@0.1.1.0/bytes.bend as B import bend-osdev-acpi@0.1.1.0/error.bend as E import bend-osdev-acpi@0.1.1.0/aml_value.bend as V # element i of a package, buffer or string def AmlValue.element(v: V.AmlValue, +i: Nat) -> Result<&2, &2, E.AcpiError, V.AmlValue>: match v: case V.AmlPkg{xs}: in.nth(xs, i) case V.AmlBuf{b}: in.byte.at(B.Octets.at(b, i)) case V.AmlStr{s}: in.byte.at(B.Octets.at(s, i)) case _: Fail{E.AcpiAmlBadType{"Index of a value that is not a package, buffer or string"}} Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_interp.bend&name=in.byte.at https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_interp.bend&name=in.nth https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_value.bend&name=AmlValue https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/error.bend&name=AcpiError https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/bytes.bend&name=Octets.at