pub struct Config<'a, TParams> {
pub virtual_machine: HostVmPrototype,
pub function_to_call: &'a str,
pub parameter: TParams,
pub storage_main_trie_changes: TrieDiff,
pub storage_proof_size_behavior: StorageProofSizeBehavior,
pub max_log_level: u32,
pub calculate_trie_changes: bool,
}Expand description
Configuration for run.
Fields§
§virtual_machine: HostVmPrototypeVirtual machine to be run.
function_to_call: &'a strName of the function to be called.
parameter: TParamsParameter of the call, as an iterator of bytes. The concatenation of bytes forms the actual input.
storage_main_trie_changes: TrieDiffInitial state of Success::storage_changes. The changes made during this
execution will be pushed over the value in this field.
storage_proof_size_behavior: StorageProofSizeBehaviorBehavior if the ext_storage_proof_size_storage_proof_size_version_1 host function is
called.
See the documentation of StorageProofSizeBehavior.
max_log_level: u32Maximum log level of the runtime.
Note: This value is opaque from the point of the view of the client, and the runtime is free to interpret it the way it wants. However, usually values are:
0for “off”,1for “error”,2for “warn”,3for “info”,4for “debug”, and5for “trace”.
calculate_trie_changes: boolIf true, then StorageChanges::trie_changes_iter_ordered will return Some.
Passing None requires fewer calculation and fewer storage accesses.
Auto Trait Implementations§
impl<'a, TParams> Freeze for Config<'a, TParams>where
TParams: Freeze,
impl<'a, TParams> !RefUnwindSafe for Config<'a, TParams>
impl<'a, TParams> Send for Config<'a, TParams>where
TParams: Send,
impl<'a, TParams> Sync for Config<'a, TParams>where
TParams: Sync,
impl<'a, TParams> Unpin for Config<'a, TParams>where
TParams: Unpin,
impl<'a, TParams> !UnwindSafe for Config<'a, TParams>
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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>
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>
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