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_imports: bool,
    pub check_and_canonize_stack_end: bool,
    pub check_mut_global_exports: bool,
    pub check_start_section: bool,
    pub check_data_section: bool,
    pub make_validation: bool,
}Expand description
Configuration for Code::try_new_mock_.
By default all checks enabled.
Fields§
§version: u32Instrumentation version
stack_height: Option<u32>Stack height limit
export_stack_height: boolExport STACK_HEIGHT_EXPORT_NAME global
check_exports: boolCheck exports (wasm contains init or handle exports)
check_imports: boolCheck imports (check that all imports are valid syscalls with correct signature)
check_and_canonize_stack_end: boolCheck and canonize stack end
check_mut_global_exports: boolCheck mutable global exports
check_start_section: boolCheck start section (not allowed for programs)
check_data_section: boolCheck data section
make_validation: boolMake 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 Freeze for TryNewCodeConfig
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