Trait rspirv::binary::Consumer[][src]

pub trait Consumer {
    fn initialize(&mut self) -> Action;
fn finalize(&mut self) -> Action;
fn consume_header(&mut self, module: ModuleHeader) -> Action;
fn consume_instruction(&mut self, inst: Instruction) -> Action; }

The binary consumer trait.

The parser will call initialize before parsing the SPIR-V binary and finalize after successfully parsing the whle binary.

After successfully parsing the module header, consume_header will be called. After successfully parsing an instruction, consume_instruction will be called.

The consumer can use Action to control the parsing process.

Required Methods

Intialize the consumer.

Finalize the consumer.

Consume the module header.

Consume the given instruction.

Implementors