AmlValue.AmlValue.to_buf: def of bend-osdev-acpi@0.1.1.0 Import: import bend-osdev-acpi@0.1.1.0/aml_value.bend as AmlValue Lines 204-215 of bend-osdev-acpi@0.1.1.0/aml_value.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-acpi@0.1.1.0/aml_value.bend&start_line=204&end_line=215 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 # the implicit conversion to Buffer: an integer's 8 (or 4) bytes, # little-endian; a string's bytes and its NUL def AmlValue.to_buf(+wide: Bool, v: AmlValue) -> Result<&2, &2, E.AcpiError, B.Octets>: match v: case AmlInt{x}: Done{val.int.bytes(wide, x)} case AmlBuf{b}: Done{b} case AmlStr{s}: Done{B.Octets.append(s, B.Octets.of_list([0]))} case _: Fail{E.AcpiAmlBadType{"cannot convert to a buffer"}} Uses (9): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List 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_value.bend&name=AmlValue https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_value.bend&name=val.int.bytes 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.append https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/bytes.bend&name=Octets.of_list