Struct ckb_vm::machine::trace::TraceMachine
source · 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 new(machine: DefaultMachine<Inner>) -> Self
pub fn load_program( &mut self, program: &Bytes, args: &[Bytes], ) -> Result<u64, Error>
pub fn load_program_with_metadata( &mut self, program: &Bytes, metadata: &ProgramMetadata, args: &[Bytes], ) -> Result<u64, Error>
pub fn set_max_cycles(&mut self, cycles: u64)
pub fn run(&mut self) -> Result<i8, Error>
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
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>where
Inner: Sync,
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