AmlField.AmlUnit.take: def of bend-osdev-acpi@0.1.2.0 Import: import bend-osdev-acpi@0.1.2.0/aml_field.bend as AmlField Lines 119-124 of bend-osdev-acpi@0.1.2.0/aml_field.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-acpi@0.1.2.0/aml_field.bend&start_line=119&end_line=124 import Base import bend-osdev-word64@0.1.1.1/word64.bend as W # the field bits a unit holds, from the unit's value v, in place in the # field's value def AmlUnit.take(u: AmlUnit, +v: W.W64) -> W.W64: match u: case AmlUnit{a, +s, +n, +d, ok}: W.W64.shl(W.W64.and(W.W64.shr(v, s), fld.mask(n)), d) Uses (6): https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.2.0/aml_field.bend&name=AmlUnit https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.2.0/aml_field.bend&name=fld.mask https://jend.leeeet.dev/definition.txt?path=bend-osdev-word64@0.1.1.1/word64.bend&name=W64 https://jend.leeeet.dev/definition.txt?path=bend-osdev-word64@0.1.1.1/word64.bend&name=W64.and https://jend.leeeet.dev/definition.txt?path=bend-osdev-word64@0.1.1.1/word64.bend&name=W64.shl https://jend.leeeet.dev/definition.txt?path=bend-osdev-word64@0.1.1.1/word64.bend&name=W64.shr