Struct sc_service::client::LocalCallExecutor [−][src]
pub struct LocalCallExecutor<Block: BlockT, B, E> { /* fields omitted */ }
Expand description
Call executor that executes methods locally, querying all required data from local backend.
Implementations
impl<Block: BlockT, B, E> LocalCallExecutor<Block, B, E> where
E: CodeExecutor + RuntimeVersionOf + Clone + 'static,
B: Backend<Block>,
impl<Block: BlockT, B, E> LocalCallExecutor<Block, B, E> where
E: CodeExecutor + RuntimeVersionOf + Clone + 'static,
B: Backend<Block>,
pub fn new(
backend: Arc<B>,
executor: E,
spawn_handle: Box<dyn SpawnNamed>,
client_config: ClientConfig<Block>
) -> Result<Self>
pub fn new(
backend: Arc<B>,
executor: E,
spawn_handle: Box<dyn SpawnNamed>,
client_config: ClientConfig<Block>
) -> Result<Self>
Creates new instance of local call executor.
Trait Implementations
impl<B, E, Block> CallExecutor<Block> for LocalCallExecutor<Block, B, E> where
B: Backend<Block>,
E: CodeExecutor + RuntimeVersionOf + Clone + 'static,
Block: BlockT,
impl<B, E, Block> CallExecutor<Block> for LocalCallExecutor<Block, B, E> where
B: Backend<Block>,
E: CodeExecutor + RuntimeVersionOf + Clone + 'static,
Block: BlockT,
type Backend = B
type Backend = B
The backend used by the node.
Execute a call to a contract on top of state in a block of given hash. Read more
fn contextual_call<EM: Fn(Result<NativeOrEncoded<R>, Self::Error>, Result<NativeOrEncoded<R>, Self::Error>) -> Result<NativeOrEncoded<R>, Self::Error>, R: Encode + Decode + PartialEq, NC: FnOnce() -> Result<R, ApiError> + UnwindSafe>(
&self,
at: &BlockId<Block>,
method: &str,
call_data: &[u8],
changes: &RefCell<OverlayedChanges>,
storage_transaction_cache: Option<&RefCell<StorageTransactionCache<Block, B::State>>>,
execution_manager: ExecutionManager<EM>,
native_call: Option<NC>,
recorder: &Option<ProofRecorder<Block>>,
extensions: Option<Extensions>
) -> Result<NativeOrEncoded<R>, Error> where
ExecutionManager<EM>: Clone,
fn contextual_call<EM: Fn(Result<NativeOrEncoded<R>, Self::Error>, Result<NativeOrEncoded<R>, Self::Error>) -> Result<NativeOrEncoded<R>, Self::Error>, R: Encode + Decode + PartialEq, NC: FnOnce() -> Result<R, ApiError> + UnwindSafe>(
&self,
at: &BlockId<Block>,
method: &str,
call_data: &[u8],
changes: &RefCell<OverlayedChanges>,
storage_transaction_cache: Option<&RefCell<StorageTransactionCache<Block, B::State>>>,
execution_manager: ExecutionManager<EM>,
native_call: Option<NC>,
recorder: &Option<ProofRecorder<Block>>,
extensions: Option<Extensions>
) -> Result<NativeOrEncoded<R>, Error> where
ExecutionManager<EM>: Clone,
Execute a contextual call on top of state in a block of a given hash. Read more
Extract RuntimeVersion of given block Read more
impl<Block, B, E> GetNativeVersion for LocalCallExecutor<Block, B, E> where
B: Backend<Block>,
E: CodeExecutor + GetNativeVersion + Clone + 'static,
Block: BlockT,
impl<Block, B, E> GetNativeVersion for LocalCallExecutor<Block, B, E> where
B: Backend<Block>,
E: CodeExecutor + GetNativeVersion + Clone + 'static,
Block: BlockT,
Returns the version of the native runtime.
impl<Block, B, E> GetRuntimeVersionAt<Block> for LocalCallExecutor<Block, B, E> where
B: Backend<Block>,
E: CodeExecutor + RuntimeVersionOf + Clone + 'static,
Block: BlockT,
impl<Block, B, E> GetRuntimeVersionAt<Block> for LocalCallExecutor<Block, B, E> where
B: Backend<Block>,
E: CodeExecutor + RuntimeVersionOf + Clone + 'static,
Block: BlockT,
Returns the version of runtime at the given block.
Auto Trait Implementations
impl<Block, B, E> !RefUnwindSafe for LocalCallExecutor<Block, B, E>
impl<Block, B, E> Send for LocalCallExecutor<Block, B, E> where
B: Send + Sync,
E: Send,
impl<Block, B, E> Sync for LocalCallExecutor<Block, B, E> where
B: Send + Sync,
E: Sync,
impl<Block, B, E> Unpin for LocalCallExecutor<Block, B, E> where
E: Unpin,
<Block as Block>::Hash: Unpin,
impl<Block, B, E> !UnwindSafe for LocalCallExecutor<Block, B, E>
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
Convert 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
. Read more
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self
The counterpart to unchecked_from
.
Consume self to return an equivalent value of T
.
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more