Struct ckb_vm::machine::DefaultCoreMachine
source · pub struct DefaultCoreMachine<R, M> { /* private fields */ }
Implementations§
source§impl<R: Register, M: Memory> DefaultCoreMachine<R, M>
impl<R: Register, M: Memory> DefaultCoreMachine<R, M>
Trait Implementations§
source§impl<R: Register, M: Memory<REG = R>> CoreMachine for DefaultCoreMachine<R, M>
impl<R: Register, M: Memory<REG = R>> CoreMachine for DefaultCoreMachine<R, M>
type REG = R
type MEM = M
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<R: Default, M: Default> Default for DefaultCoreMachine<R, M>
impl<R: Default, M: Default> Default for DefaultCoreMachine<R, M>
source§fn default() -> DefaultCoreMachine<R, M>
fn default() -> DefaultCoreMachine<R, M>
Returns the “default value” for a type. Read more
source§impl<R: Register, M: Memory<REG = R>> SupportMachine for DefaultCoreMachine<R, M>
impl<R: Register, M: Memory<REG = R>> SupportMachine for DefaultCoreMachine<R, M>
fn cycles(&self) -> u64
fn set_cycles(&mut self, cycles: u64)
fn max_cycles(&self) -> u64
fn set_max_cycles(&mut self, max_cycles: u64)
fn reset(&mut self, max_cycles: u64)
fn reset_signal(&mut self) -> bool
fn running(&self) -> bool
fn set_running(&mut self, running: bool)
fn load_binary( &mut self, program: &Bytes, metadata: &ProgramMetadata, update_pc: bool, ) -> Result<u64, Error>
fn load_elf(&mut self, program: &Bytes, update_pc: bool) -> Result<u64, Error>
fn add_cycles(&mut self, cycles: u64) -> Result<(), Error>
fn add_cycles_no_checking(&mut self, cycles: u64) -> Result<(), Error>
fn load_elf_inner( &mut self, program: &Bytes, update_pc: bool, ) -> Result<u64, Error>
fn load_binary_inner( &mut self, program: &Bytes, metadata: &ProgramMetadata, update_pc: bool, ) -> Result<u64, Error>
fn initialize_stack( &mut self, args: &[Bytes], stack_start: u64, stack_size: u64, ) -> Result<u64, Error>
Auto Trait Implementations§
impl<R, M> Freeze for DefaultCoreMachine<R, M>
impl<R, M> RefUnwindSafe for DefaultCoreMachine<R, M>where
R: RefUnwindSafe,
M: RefUnwindSafe,
impl<R, M> Send for DefaultCoreMachine<R, M>
impl<R, M> Sync for DefaultCoreMachine<R, M>
impl<R, M> Unpin for DefaultCoreMachine<R, M>
impl<R, M> UnwindSafe for DefaultCoreMachine<R, M>where
R: UnwindSafe,
M: UnwindSafe,
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