Skip to content

vihaco_module::loader

loader

vihaco_module::loader

classProgramImagesource

vihaco_module::loader::ProgramImage

Bases: Debug, Clone, Default, ProgramCounter, GetProgramInfo

Rust struct.

pub struct ProgramImage<I, C, V, Ty, Info>

Fields

NameTypeDescription
moduleLocalModule&lt;I, V, Ty, Info&gt;
contextOption&lt;ContextHandle&lt;C&gt;&gt;
pcu32
source

methodcontextsource

vihaco_module::loader::ProgramImage::context

pub fn context(&self) -> Result<&C>

Returns

Result<&C>

source

methodnewsource

vihaco_module::loader::ProgramImage::new

pub fn new() -> Self

Returns

Self

source

methodwith_extrasource

vihaco_module::loader::ProgramImage::with_extra

pub fn with_extra(extra: Info) -> Self

Parameters

NameTypeDescription
extraInfo

Returns

Self

source

classLoadBytecodeSectionsource

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.

source

methodload_bytecode_sectionsource

vihaco_module::loader::LoadBytecodeSection::load_bytecode_section

Signature
fn load_bytecode_section<'bc>(&mut self, section: BytecodeSectionView<'bc, C>) -> Result<()>

Parameters

NameTypeDescription
sectionBytecodeSectionView&lt;'bc, C&gt;

Returns

Result<()>

source

classLoadOwnBytecodeSectionsource

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.

source

methodload_own_bytecode_sectionsource

vihaco_module::loader::LoadOwnBytecodeSection::load_own_bytecode_section

Signature
fn load_own_bytecode_section<'bc>(&mut self, section: BytecodeSectionView<'bc, C>) -> Result<()>

Parameters

NameTypeDescription
sectionBytecodeSectionView&lt;'bc, C&gt;

Returns

Result<()>

source

classLoadOwnSstSectionsource

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.

source

methodload_own_sst_sectionsource

vihaco_module::loader::LoadOwnSstSection::load_own_sst_section

Signature
fn load_own_sst_section<'bc>(&mut self, section: SstSectionView<'bc, C>) -> Result<()>

Parameters

NameTypeDescription
sectionSstSectionView&lt;'bc, C&gt;

Returns

Result<()>

source

classLoadSstSectionsource

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.

source

methodload_sst_sectionsource

vihaco_module::loader::LoadSstSection::load_sst_section

Signature
fn load_sst_section<'bc>(&mut self, section: SstSectionView<'bc, C>) -> Result<()>

Parameters

NameTypeDescription
sectionSstSectionView&lt;'bc, C&gt;

Returns

Result<()>

source