vihaco_module::loader
loader¶
vihaco_module::loader
classProgramImage¶source
vihaco_module::loader::ProgramImage
Bases: Debug, Clone, Default, ProgramCounter, GetProgramInfo
Rust struct.
pub struct ProgramImage<I, C, V, Ty, Info>Fields
| Name | Type | Description |
|---|---|---|
module | LocalModule<I, V, Ty, Info> | |
context | Option<ContextHandle<C>> | |
pc | u32 |
methodcontext¶source
vihaco_module::loader::ProgramImage::context
methodnew¶source
vihaco_module::loader::ProgramImage::new
methodwith_extra¶source
vihaco_module::loader::ProgramImage::with_extra
classLoadBytecodeSection¶source
vihaco_module::loader::LoadBytecodeSection
Rust trait. Allow a machine to load a bytecode section completely.
pub trait LoadBytecodeSection<C>For composites generated by [`vihaco_runtime_derive::composite`], this loads the composite’s own section through LoadOwnBytecodeSection and then forwards direct child sections to `#[loadable]` devices.
sourcemethodload_bytecode_section¶source
vihaco_module::loader::LoadBytecodeSection::load_bytecode_section
Signature
fn load_bytecode_section<'bc>(&mut self, section: BytecodeSectionView<'bc, C>) -> Result<()>Parameters
| Name | Type | Description |
|---|---|---|
section | BytecodeSectionView<'bc, C> |
Returns
Result<()>
classLoadOwnBytecodeSection¶source
vihaco_module::loader::LoadOwnBytecodeSection
Rust trait. Allow a machine to load the bytecode data owned directly by its section.
pub trait LoadOwnBytecodeSection<C>When used with the [`vihaco_runtime_derive::composite`] macro, this hook runs before generated child-section forwarding. Implement this for each composite to make its own section behavior explicit, even when that behavior is a no-op.
sourcemethodload_own_bytecode_section¶source
vihaco_module::loader::LoadOwnBytecodeSection::load_own_bytecode_section
Signature
fn load_own_bytecode_section<'bc>(&mut self, section: BytecodeSectionView<'bc, C>) -> Result<()>Parameters
| Name | Type | Description |
|---|---|---|
section | BytecodeSectionView<'bc, C> |
Returns
Result<()>
classLoadOwnSstSection¶source
vihaco_module::loader::LoadOwnSstSection
Rust trait. Allow a machine to load the SST data owned directly by its section.
pub trait LoadOwnSstSection<C>When used with the [`vihaco_runtime_derive::composite`] macro, this hook runs before generated child-section forwarding. Implement this for each composite to make its own section behavior explicit, even when that behavior is a no-op.
sourcemethodload_own_sst_section¶source
vihaco_module::loader::LoadOwnSstSection::load_own_sst_section
Signature
fn load_own_sst_section<'bc>(&mut self, section: SstSectionView<'bc, C>) -> Result<()>Parameters
| Name | Type | Description |
|---|---|---|
section | SstSectionView<'bc, C> |
Returns
Result<()>
classLoadSstSection¶source
vihaco_module::loader::LoadSstSection
Rust trait. Allow a machine to load an SST section completely.
pub trait LoadSstSection<C>For composites generated by [`vihaco_runtime_derive::composite`], this loads the composite’s own section through LoadOwnSstSection and then forwards direct child sections to `#[loadable]` devices.
sourcemethodload_sst_section¶source
vihaco_module::loader::LoadSstSection::load_sst_section
Signature
fn load_sst_section<'bc>(&mut self, section: SstSectionView<'bc, C>) -> Result<()>Parameters
| Name | Type | Description |
|---|---|---|
section | SstSectionView<'bc, C> |
Returns
Result<()>