Struct ckb_vm::memory::wxorx::WXorXMemory

source ·
pub struct WXorXMemory<M: Memory> { /* private fields */ }

Implementations§

source§

impl<M: Memory> WXorXMemory<M>

source

pub fn inner_mut(&mut self) -> &mut M

Trait Implementations§

source§

impl<M: Memory> Memory for WXorXMemory<M>

§

type REG = <M as Memory>::REG

source§

fn new() -> Self

source§

fn new_with_memory(memory_size: usize) -> Self

source§

fn init_pages( &mut self, addr: u64, size: u64, flags: u8, source: Option<Bytes>, offset_from_addr: u64, ) -> Result<(), Error>

source§

fn fetch_flag(&mut self, page: u64) -> Result<u8, Error>

source§

fn set_flag(&mut self, page: u64, flag: u8) -> Result<(), Error>

source§

fn clear_flag(&mut self, page: u64, flag: u8) -> Result<(), Error>

source§

fn memory_size(&self) -> usize

source§

fn execute_load16(&mut self, addr: u64) -> Result<u16, Error>

source§

fn execute_load32(&mut self, addr: u64) -> Result<u32, Error>

source§

fn load8(&mut self, addr: &Self::REG) -> Result<Self::REG, Error>

source§

fn load16(&mut self, addr: &Self::REG) -> Result<Self::REG, Error>

source§

fn load32(&mut self, addr: &Self::REG) -> Result<Self::REG, Error>

source§

fn load64(&mut self, addr: &Self::REG) -> Result<Self::REG, Error>

source§

fn store8(&mut self, addr: &Self::REG, value: &Self::REG) -> Result<(), Error>

source§

fn store16(&mut self, addr: &Self::REG, value: &Self::REG) -> Result<(), Error>

source§

fn store32(&mut self, addr: &Self::REG, value: &Self::REG) -> Result<(), Error>

source§

fn store64(&mut self, addr: &Self::REG, value: &Self::REG) -> Result<(), Error>

source§

fn store_bytes(&mut self, addr: u64, value: &[u8]) -> Result<(), Error>

source§

fn store_byte(&mut self, addr: u64, size: u64, value: u8) -> Result<(), Error>

source§

fn load_bytes(&mut self, addr: u64, size: u64) -> Result<Bytes, Error>

source§

fn lr(&self) -> &Self::REG

source§

fn set_lr(&mut self, value: &Self::REG)

source§

fn memory_pages(&self) -> usize

Auto Trait Implementations§

§

impl<M> Freeze for WXorXMemory<M>
where M: Freeze,

§

impl<M> RefUnwindSafe for WXorXMemory<M>
where M: RefUnwindSafe,

§

impl<M> Send for WXorXMemory<M>
where M: Send,

§

impl<M> Sync for WXorXMemory<M>
where M: Sync,

§

impl<M> Unpin for WXorXMemory<M>
where M: Unpin,

§

impl<M> UnwindSafe for WXorXMemory<M>
where M: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.