Skip to content

vihaco_runtime (crate)

vihaco_runtime

vihaco_runtime

classCompositeMetadatasource

vihaco_runtime::CompositeMetadata

Bases: Debug, Clone, StructuralPartialEq, PartialEq, Eq

Rust struct.

pub struct CompositeMetadata

Fields

NameTypeDescription
devices&'static [DeviceMetadata]
source_symbol_aliases&'static [SourceSymbolAliasMetadata]
source

methoddevice_by_namesource

vihaco_runtime::CompositeMetadata::device_by_name

Signature
pub fn device_by_name(&self, name: &str) -> Option<&'static DeviceMetadata>

Parameters

NameTypeDescription
name&amp;str

Returns

Option<&'static DeviceMetadata>

source

methoddevicessource

vihaco_runtime::CompositeMetadata::devices

pub fn devices(&self) -> &'static [DeviceMetadata]

Returns

&'static [DeviceMetadata]

source

methodsource_symbol_aliasessource

vihaco_runtime::CompositeMetadata::source_symbol_aliases

Signature
pub fn source_symbol_aliases(&self) -> &'static [SourceSymbolAliasMetadata]

Returns

&'static [SourceSymbolAliasMetadata]

source

methodsource_symbol_device_codesource

vihaco_runtime::CompositeMetadata::source_symbol_device_code

pub fn source_symbol_device_code(&self, name: &str) -> Option<u8>

Parameters

NameTypeDescription
name&amp;str

Returns

Option<u8>

source

methodvalidate_source_symbolssource

vihaco_runtime::CompositeMetadata::validate_source_symbols

Signature
pub fn validate_source_symbols<I, V, Ty, Info>(&self, module: &LocalModule<I, V, Ty, Info>) -> Result<()>

Parameters

NameTypeDescription
module&amp;LocalModule&lt;I, V, Ty, Info&gt;

Returns

Result<()>

source

classComponentsource

vihaco_runtime::Component

Rust trait.

pub trait Component: HasInstructionSet
source

classCompositesource

vihaco_runtime::Composite

Rust trait.

pub trait Composite: HasInstructionSet
source

classGeneratedComponentsource

vihaco_runtime::GeneratedComponent

Rust trait.

pub trait GeneratedComponent

Associated items

NameTypeDescription
Instructiontype Instructionassociated type
Messagetype Messageassociated type
Effecttype Effectassociated type
source

methodexecute_generatedsource

vihaco_runtime::GeneratedComponent::execute_generated

Signature
fn execute_generated(&mut self, inst: <Self as >::Instruction, msg: <Self as >::Message) -> Result<Effects<<Self as >::Effect>>

Parameters

NameTypeDescription
inst&lt;Self as &gt;::Instruction
msg&lt;Self as &gt;::Message

Returns

Result<Effects<<Self as >::Effect>>

source

classHasInstructionSetsource

vihaco_runtime::HasInstructionSet

Rust trait. The instruction types exposed by a device to its two execution layers.

pub trait HasInstructionSet

Associated items

NameTypeDescription
Runtimetype Runtimeassociated type. The instruction consumed by the runtime device.
Syntaxtype Syntaxassociated type. The instruction parsed from source syntax.
source

classMessagesource

vihaco_runtime::Message

Rust trait.

pub trait Message: 'static
source

classObservesource

vihaco_runtime::Observe

Rust trait.

pub trait Observe<E: 'static>

Associated items

NameTypeDescription
Effecttype Effect: 'staticassociated type
Errortype Errorassociated type
source

methodobservesource

vihaco_runtime::Observe::observe

Signature
fn observe(&mut self, effect: &E) -> Result<Effects<<Self as >::Effect>, <Self as >::Error>

Parameters

NameTypeDescription
effect&amp;E

Returns

Result<Effects<<Self as >::Effect>, <Self as >::Error>

source

functionexpect_exactly_one_effectsource

vihaco_runtime::expect_exactly_one_effect

pub fn expect_exactly_one_effect<E>(effects: Effects<E>) -> Result<E>

Parameters

NameTypeDescription
effectsEffects&lt;E&gt;

Returns

Result<E>

source