MCPcopy Create free account
hub / github.com/eigenform/perfect / as_bytes

Method as_bytes

perfect/src/experiments/decoder.rs:202–211  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

200}
201impl Opcode {
202 pub fn as_bytes(&self) -> Vec<u8> {
203 match self {
204 Self::Op(op) => [op.0].to_vec(),
205 Self::Op38(op) => [0x0f, 0x38, op.0].to_vec(),
206 Self::Op3a(op) => [0x0f, 0x3a, op.0].to_vec(),
207 Self::OpVex3(op) => [0xc4, op.0, op.1].to_vec(),
208 Self::OpVex2(op) => [0xc5, op.0].to_vec(),
209 Self::OpXop3(op) => [0x8f, op.0, op.1].to_vec(),
210 }
211 }
212}
213
214#[derive(Clone)]

Callers 4

runMethod · 0.80
pin_to_cpusetMethod · 0.80
sampleMethod · 0.80

Calls 1

lenMethod · 0.45

Tested by 1

runMethod · 0.64