pub struct LazyPagesRuntimeInterface;
Trait Implementations§
source§impl LazyPagesInterface for LazyPagesRuntimeInterface
impl LazyPagesInterface for LazyPagesRuntimeInterface
source§fn try_to_enable_lazy_pages(prefix: [u8; 32]) -> bool
fn try_to_enable_lazy_pages(prefix: [u8; 32]) -> bool
Try to enable and initialize lazy pages env
source§fn init_for_program<Context>(
ctx: &mut Context,
mem: &mut impl Memory<Context>,
program_id: ProgramId,
memory_infix: MemoryInfix,
stack_end: Option<WasmPage>,
globals_config: GlobalsAccessConfig,
costs: LazyPagesCosts,
)
fn init_for_program<Context>( ctx: &mut Context, mem: &mut impl Memory<Context>, program_id: ProgramId, memory_infix: MemoryInfix, stack_end: Option<WasmPage>, globals_config: GlobalsAccessConfig, costs: LazyPagesCosts, )
Protect and save storage keys for pages which has no data
source§fn remove_lazy_pages_prot<Context>(
ctx: &mut Context,
mem: &mut impl Memory<Context>,
)
fn remove_lazy_pages_prot<Context>( ctx: &mut Context, mem: &mut impl Memory<Context>, )
Remove lazy-pages protection, returns wasm memory begin addr
source§fn update_lazy_pages_and_protect_again<Context>(
ctx: &mut Context,
mem: &mut impl Memory<Context>,
old_mem_addr: Option<HostPointer>,
old_mem_size: WasmPagesAmount,
new_mem_addr: HostPointer,
)
fn update_lazy_pages_and_protect_again<Context>( ctx: &mut Context, mem: &mut impl Memory<Context>, old_mem_addr: Option<HostPointer>, old_mem_size: WasmPagesAmount, new_mem_addr: HostPointer, )
Protect lazy-pages and set new wasm mem addr and size,
if they have been changed.
source§fn get_write_accessed_pages() -> Vec<GearPage>
fn get_write_accessed_pages() -> Vec<GearPage>
Returns list of released pages numbers.
source§fn get_status() -> Status
fn get_status() -> Status
Returns lazy pages actual status.
source§fn pre_process_memory_accesses(
reads: &[MemoryInterval],
writes: &[MemoryInterval],
gas_counter: &mut u64,
) -> Result<(), ProcessAccessError>
fn pre_process_memory_accesses( reads: &[MemoryInterval], writes: &[MemoryInterval], gas_counter: &mut u64, ) -> Result<(), ProcessAccessError>
Pre-process memory access in syscalls in lazy-pages.
Auto Trait Implementations§
impl Freeze for LazyPagesRuntimeInterface
impl RefUnwindSafe for LazyPagesRuntimeInterface
impl Send for LazyPagesRuntimeInterface
impl Sync for LazyPagesRuntimeInterface
impl Unpin for LazyPagesRuntimeInterface
impl UnwindSafe for LazyPagesRuntimeInterface
Blanket Implementations§
source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
source§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
The counterpart to
unchecked_from
.source§impl<T> Upcastable for T
impl<T> Upcastable for T
source§fn upcast_any_ref(&self) -> &(dyn Any + 'static)
fn upcast_any_ref(&self) -> &(dyn Any + 'static)
upcast ref
source§fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
upcast mut ref