Function fuel_asm::from_bytes
source ยท pub fn from_bytes<I>(
bs: I,
) -> impl Iterator<Item = Result<Instruction, InvalidOpcode>>where
I: IntoIterator<Item = u8>,
Expand description
Given an iterator yielding bytes, produces an iterator yielding Instruction
s.
This function assumes each consecutive 4 bytes aligns with an instruction.
The produced iterator yields an Err
in the case that an instruction fails to parse
from 4 consecutive bytes.