Struct sc_service::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.
impl<B, E, Block> RuntimeVersionOf for LocalCallExecutor<Block, B, E> where
E: RuntimeVersionOf,
Block: BlockT,
impl<B, E, Block> RuntimeVersionOf for LocalCallExecutor<Block, B, E> where
E: RuntimeVersionOf,
Block: BlockT,
fn runtime_version(
&self,
ext: &mut dyn Externalities,
runtime_code: &RuntimeCode<'_>
) -> Result<RuntimeVersion, Error>
fn runtime_version(
&self,
ext: &mut dyn Externalities,
runtime_code: &RuntimeCode<'_>
) -> Result<RuntimeVersion, Error>
Extract RuntimeVersion
of the given runtime_code
.
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
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>ⓘimpl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>ⓘimpl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;
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
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
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
The counterpart to unchecked_from
.
Consume self to return an equivalent value of T
.
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
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