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
fn initialize(&mut self) -> Action
[src]
Intialize the consumer.
fn finalize(&mut self) -> Action
[src]
Finalize the consumer.
fn consume_header(&mut self, module: ModuleHeader) -> Action
[src]
Consume the module header.
fn consume_instruction(&mut self, inst: Instruction) -> Action
[src]
Consume the given instruction.
Implementors
impl Consumer for Loader
[src]
impl Consumer for Loader
[src]