pub struct CodeValidator { /* private fields */ }
Expand description
Checks the program code for possible errors.
NOTE: pallet-gear
crate performs the same check at the node level
when the user tries to upload program code.
Implementations§
Source§impl CodeValidator
impl CodeValidator
Sourcepub fn validate_program(self) -> Result<()>
pub fn validate_program(self) -> Result<()>
Validates wasm code in the same way as
pallet_gear::pallet::Pallet::upload_program(...)
.
Sourcepub fn validate_metawasm(self) -> Result<()>
pub fn validate_metawasm(self) -> Result<()>
Validate metawasm code in the same way as
pallet_gear::pallet::Pallet::read_state_using_wasm(...)
.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CodeValidator
impl RefUnwindSafe for CodeValidator
impl Send for CodeValidator
impl Sync for CodeValidator
impl Unpin for CodeValidator
impl UnwindSafe for CodeValidator
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
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 more