AmlInterp.in.convert: def of bend-osdev-acpi@0.1.1.0 Import: import bend-osdev-acpi@0.1.1.0/aml_interp.bend as AmlInterp Lines 686-697 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=686&end_line=697 import Base import bend-osdev-word64@0.1.1.0/word64.bend as W 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 # the value v stored where a Name holds old: converted to old type when # old is an Integer, a String or a Buffer (a Buffer keeps its length) def in.convert(+wide: Bool, old: V.AmlValue, +v: V.AmlValue) -> Result<&2, &2, E.AcpiError, V.AmlValue>: match old: case V.AmlInt{x}: Result.map(&2, &2, E.AcpiError, W.W64, V.AmlValue, y => V.AmlInt{y}, V.AmlValue.to_int(wide, v)) case V.AmlStr{s}: Result.map(&2, &2, E.AcpiError, B.Octets, V.AmlValue, t => V.AmlStr{t}, V.AmlValue.to_str(wide, v)) case V.AmlBuf{+b}: Result.map(&2, &2, E.AcpiError, B.Octets, V.AmlValue, t => V.AmlBuf{in.fit.buf(B.Octets.len(b), t)}, V.AmlValue.to_buf(wide, v)) case _: Done{v} Uses (12): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result.map https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_interp.bend&name=in.fit.buf 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/aml_value.bend&name=AmlValue.to_buf https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_value.bend&name=AmlValue.to_int https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_value.bend&name=AmlValue.to_str 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 https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/bytes.bend&name=Octets.len https://jend.leeeet.dev/definition.txt?path=bend-osdev-word64@0.1.1.0/word64.bend&name=W64