pub struct TraceMachine<Inner: SupportMachine> {
pub machine: DefaultMachine<Inner>,
/* private fields */
}Fields§
§machine: DefaultMachine<Inner>Implementations§
Source§impl<Inner: SupportMachine> TraceMachine<Inner>
impl<Inner: SupportMachine> TraceMachine<Inner>
pub fn load_program( &mut self, program: &Bytes, args: impl ExactSizeIterator<Item = Result<Bytes, Error>>, ) -> Result<u64, Error>
pub fn load_program_with_metadata( &mut self, program: &Bytes, metadata: &ProgramMetadata, args: impl ExactSizeIterator<Item = Result<Bytes, Error>>, ) -> Result<u64, Error>
pub fn set_max_cycles(&mut self, cycles: u64)
Trait Implementations§
Source§impl<Inner: SupportMachine> CoreMachine for TraceMachine<Inner>
impl<Inner: SupportMachine> CoreMachine for TraceMachine<Inner>
type REG = <Inner as CoreMachine>::REG
type MEM = <Inner as CoreMachine>::MEM
fn pc(&self) -> &Self::REG
fn update_pc(&mut self, pc: Self::REG)
fn commit_pc(&mut self)
fn memory(&self) -> &Self::MEM
fn memory_mut(&mut self) -> &mut Self::MEM
fn registers(&self) -> &[Self::REG]
fn set_register(&mut self, idx: usize, value: Self::REG)
fn isa(&self) -> u8
fn version(&self) -> u32
Source§impl<Inner: SupportMachine> DefaultMachineRunner for TraceMachine<Inner>
impl<Inner: SupportMachine> DefaultMachineRunner for TraceMachine<Inner>
type Inner = Inner
Source§fn new(machine: DefaultMachine<Inner>) -> Self
fn new(machine: DefaultMachine<Inner>) -> Self
Creates a new runner
Source§fn machine(&self) -> &DefaultMachine<Inner>
fn machine(&self) -> &DefaultMachine<Inner>
Fetches DefaultMachine
Source§fn machine_mut(&mut self) -> &mut DefaultMachine<Inner>
fn machine_mut(&mut self) -> &mut DefaultMachine<Inner>
Fetches mutable DefaultMachine
Source§fn inner_mut(&mut self) -> &mut Self::Inner
fn inner_mut(&mut self) -> &mut Self::Inner
Fetches the inner SupportMachine for more processing
Source§fn load_program(
&mut self,
program: &Bytes,
args: impl ExactSizeIterator<Item = Result<Bytes, Error>>,
) -> Result<u64, Error>
fn load_program( &mut self, program: &Bytes, args: impl ExactSizeIterator<Item = Result<Bytes, Error>>, ) -> Result<u64, Error>
Loads program
Source§fn load_program_with_metadata(
&mut self,
program: &Bytes,
metadata: &ProgramMetadata,
args: impl ExactSizeIterator<Item = Result<Bytes, Error>>,
) -> Result<u64, Error>
fn load_program_with_metadata( &mut self, program: &Bytes, metadata: &ProgramMetadata, args: impl ExactSizeIterator<Item = Result<Bytes, Error>>, ) -> Result<u64, Error>
Loads program with lazy loading metadata
Auto Trait Implementations§
impl<Inner> Freeze for TraceMachine<Inner>where
Inner: Freeze,
impl<Inner> !RefUnwindSafe for TraceMachine<Inner>
impl<Inner> Send for TraceMachine<Inner>where
Inner: Send,
impl<Inner> !Sync for TraceMachine<Inner>
impl<Inner> Unpin for TraceMachine<Inner>where
Inner: Unpin,
impl<Inner> !UnwindSafe for TraceMachine<Inner>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more