pub struct CallApiAtParams<'a, Block: BlockT, C, NC, Backend: StateBackend<HashFor<Block>>> {
pub core_api: &'a C,
pub at: &'a BlockId<Block>,
pub function: &'static str,
pub native_call: Option<NC>,
pub arguments: Vec<u8>,
pub overlayed_changes: &'a RefCell<OverlayedChanges>,
pub storage_transaction_cache: &'a RefCell<StorageTransactionCache<Block, Backend>>,
pub initialize_block: InitializeBlock<'a, Block>,
pub context: ExecutionContext,
pub recorder: &'a Option<ProofRecorder<Block>>,
}
Expand description
Parameters for CallApiAt::call_api_at
.
Fields§
§core_api: &'a C
A reference to something that implements the Core
api.
at: &'a BlockId<Block>
The block id that determines the state that should be setup when calling the function.
function: &'static str
The name of the function that should be called.
native_call: Option<NC>
An optional native call that calls the function
. This is an optimization to call into a
native runtime without requiring to encode/decode the parameters. The native runtime can
still be called when this value is None
, we then just fallback to encoding/decoding the
parameters.
arguments: Vec<u8>
The encoded arguments of the function.
overlayed_changes: &'a RefCell<OverlayedChanges>
The overlayed changes that are on top of the state.
storage_transaction_cache: &'a RefCell<StorageTransactionCache<Block, Backend>>
The cache for storage transactions.
initialize_block: InitializeBlock<'a, Block>
Determines if the function requires that initialize_block
should be called before calling
the actual function.
context: ExecutionContext
The context this function is executed in.
recorder: &'a Option<ProofRecorder<Block>>
The optional proof recorder for recording storage accesses.
Auto Trait Implementations§
impl<'a, Block, C, NC, Backend> Freeze for CallApiAtParams<'a, Block, C, NC, Backend>where
NC: Freeze,
impl<'a, Block, C, NC, Backend> !RefUnwindSafe for CallApiAtParams<'a, Block, C, NC, Backend>
impl<'a, Block, C, NC, Backend> !Send for CallApiAtParams<'a, Block, C, NC, Backend>
impl<'a, Block, C, NC, Backend> !Sync for CallApiAtParams<'a, Block, C, NC, Backend>
impl<'a, Block, C, NC, Backend> Unpin for CallApiAtParams<'a, Block, C, NC, Backend>where
NC: Unpin,
impl<'a, Block, C, NC, Backend> !UnwindSafe for CallApiAtParams<'a, Block, C, NC, Backend>
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> CheckedConversion for T
impl<T> CheckedConversion for 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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
Source§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
Source§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
Source§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
T
. Read moreSource§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
Source§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
unchecked_from
.Source§impl<T, S> UniqueSaturatedInto<T> for S
impl<T, S> UniqueSaturatedInto<T> for S
Source§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
T
.