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

source

pub fn new_no_exports_check() -> Self

New default config without exports checks.

Trait Implementations§

source§

impl Default for TryNewCodeConfig

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

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.
source§

impl<T> JsonSchemaMaybe for T