pub struct MemoryReader<MV: MemoryView<Store>, Store: Store> { /* private fields */ }

Implementations§

source§

impl<MV: MemoryView<Store>, Store: Store> MemoryReader<MV, Store>

source

pub fn new(view: MV) -> Self

source

pub fn sequential_reader( &self, store: &mut <Store as Store>::ActualStore<'_>, offset: u32, size: u32 ) -> LiResult<SequentialReader<'_, MV, Store>>

Returns reader that allows read sequentially. It’s important that memory limit is checked only inside this function. All others functions of the returned reader don’t have any checks assuming that reader is well-formed.

source

pub fn read_raw_u8_array( &self, store: &mut <Store as Store>::ActualStore<'_>, offset: u32, elements_count: u32 ) -> LiResult<Vec<u8>>

source

pub fn read_bool_array( &self, store: &mut <Store as Store>::ActualStore<'_>, offset: u32, elements_count: u32 ) -> LiResult<Vec<IValue>>

source

pub fn read_u8_array( &self, store: &mut <Store as Store>::ActualStore<'_>, offset: u32, elements_count: u32 ) -> LiResult<Vec<IValue>>

source

pub fn read_s8_array( &self, store: &mut <Store as Store>::ActualStore<'_>, offset: u32, elements_count: u32 ) -> LiResult<Vec<IValue>>

source

pub fn read_u16_array( &self, store: &mut <Store as Store>::ActualStore<'_>, offset: u32, elements_count: u32 ) -> LiResult<Vec<IValue>>

source

pub fn read_s16_array( &self, store: &mut <Store as Store>::ActualStore<'_>, offset: u32, elements_count: u32 ) -> LiResult<Vec<IValue>>

source

pub fn read_u32_array( &self, store: &mut <Store as Store>::ActualStore<'_>, offset: u32, elements_count: u32 ) -> LiResult<Vec<IValue>>

source

pub fn read_s32_array( &self, store: &mut <Store as Store>::ActualStore<'_>, offset: u32, elements_count: u32 ) -> LiResult<Vec<IValue>>

source

pub fn read_i32_array( &self, store: &mut <Store as Store>::ActualStore<'_>, offset: u32, elements_count: u32 ) -> LiResult<Vec<IValue>>

source

pub fn read_f32_array( &self, store: &mut <Store as Store>::ActualStore<'_>, offset: u32, elements_count: u32 ) -> LiResult<Vec<IValue>>

source

pub fn read_u64_array( &self, store: &mut <Store as Store>::ActualStore<'_>, offset: u32, elements_count: u32 ) -> LiResult<Vec<IValue>>

source

pub fn read_s64_array( &self, store: &mut <Store as Store>::ActualStore<'_>, offset: u32, elements_count: u32 ) -> LiResult<Vec<IValue>>

source

pub fn read_i64_array( &self, store: &mut <Store as Store>::ActualStore<'_>, offset: u32, elements_count: u32 ) -> LiResult<Vec<IValue>>

source

pub fn read_f64_array( &self, store: &mut <Store as Store>::ActualStore<'_>, offset: u32, elements_count: u32 ) -> LiResult<Vec<IValue>>

Auto Trait Implementations§

§

impl<MV, Store> RefUnwindSafe for MemoryReader<MV, Store>
where MV: RefUnwindSafe, Store: RefUnwindSafe,

§

impl<MV, Store> Send for MemoryReader<MV, Store>

§

impl<MV, Store> Sync for MemoryReader<MV, Store>
where MV: Sync, Store: Sync,

§

impl<MV, Store> Unpin for MemoryReader<MV, Store>
where MV: Unpin, Store: Unpin,

§

impl<MV, Store> UnwindSafe for MemoryReader<MV, Store>
where MV: UnwindSafe, Store: 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.