Struct gear_core::code::TryNewCodeConfig
source · pub struct TryNewCodeConfig {
pub version: u32,
pub stack_height: Option<u32>,
pub export_stack_height: bool,
pub check_exports: bool,
pub check_and_canonize_stack_end: bool,
pub check_mut_global_exports: bool,
pub check_start_section: bool,
pub make_validation: bool,
}
Expand description
Configuration for Code::try_new_mock_
.
By default all checks enabled.
Fields§
§version: u32
Instrumentation version
stack_height: Option<u32>
Stack height limit
export_stack_height: bool
Export __gear_stack_height
global
check_exports: bool
Check exports (wasm contains init or handle exports)
check_and_canonize_stack_end: bool
Check and canonize stack end
check_mut_global_exports: bool
Check mutable global exports
check_start_section: bool
Check start section (not allowed for smart contracts)
make_validation: bool
Make wasmparser validation
Implementations§
source§impl TryNewCodeConfig
impl TryNewCodeConfig
sourcepub fn new_no_exports_check() -> Self
pub fn new_no_exports_check() -> Self
New default config without exports checks.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for TryNewCodeConfig
impl Send for TryNewCodeConfig
impl Sync for TryNewCodeConfig
impl Unpin for TryNewCodeConfig
impl UnwindSafe for TryNewCodeConfig
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