pub struct Program { /* private fields */ }Expand description
Program.
Implementations§
source§impl Program
impl Program
sourcepub fn new(
id: ProgramId,
memory_infix: MemoryInfix,
code: InstrumentedCode
) -> Self
pub fn new( id: ProgramId, memory_infix: MemoryInfix, code: InstrumentedCode ) -> Self
New program with specific id and code.
sourcepub fn from_parts(
id: ProgramId,
memory_infix: MemoryInfix,
code: InstrumentedCode,
allocations: BTreeSet<WasmPage>
) -> Self
pub fn from_parts( id: ProgramId, memory_infix: MemoryInfix, code: InstrumentedCode, allocations: BTreeSet<WasmPage> ) -> Self
New program from stored data
sourcepub fn code(&self) -> &InstrumentedCode
pub fn code(&self) -> &InstrumentedCode
Reference to InstrumentedCode of this program.
sourcepub fn code_bytes(&self) -> &[u8]
pub fn code_bytes(&self) -> &[u8]
Reference to raw binary code of this program.
sourcepub fn memory_infix(&self) -> MemoryInfix
pub fn memory_infix(&self) -> MemoryInfix
Get the MemoryInfix of this program.
sourcepub fn static_pages(&self) -> WasmPage
pub fn static_pages(&self) -> WasmPage
Get initial memory size for this program.
sourcepub fn allocations(&self) -> &BTreeSet<WasmPage>
pub fn allocations(&self) -> &BTreeSet<WasmPage>
Get allocations as a set of page numbers.
sourcepub fn set_allocations(&mut self, allocations: BTreeSet<WasmPage>)
pub fn set_allocations(&mut self, allocations: BTreeSet<WasmPage>)
Set allocations as a set of page numbers.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Program
impl RefUnwindSafe for Program
impl Send for Program
impl Sync for Program
impl Unpin for Program
impl UnwindSafe for Program
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