pub trait Program {
type Isa: InstructionSet;
type Iter<'a>: Iterator<Item = &'a Lib>
where Self: 'a;
// Required methods
fn lib_count(&self) -> u16;
fn libs(&self) -> Self::Iter<'_>;
fn lib(&self, id: LibId) -> Option<&Lib>;
fn entrypoint(&self) -> LibSite;
}
Expand description
Trait for a concrete program implementation provided by a runtime environment.
Required Associated Types§
sourcetype Isa: InstructionSet
type Isa: InstructionSet
Instruction set architecture used by the program.
Required Methods§
sourcefn lib(&self, id: LibId) -> Option<&Lib>
fn lib(&self, id: LibId) -> Option<&Lib>
Returns library corresponding to the provided LibId
, if the library is known to the
program.
sourcefn entrypoint(&self) -> LibSite
fn entrypoint(&self) -> LibSite
Main entry point into the program.
Object Safety§
This trait is not object safe.