Struct sc_client_api::execution_extensions::ExecutionExtensions [−][src]
pub struct ExecutionExtensions<Block: Block> { /* fields omitted */ }
Expand description
A producer of execution extensions for offchain calls.
This crate aggregates extensions available for the offchain calls
and is responsible for producing a correct Extensions
object.
for each call, based on required Capabilities
.
Implementations
pub fn new(
strategies: ExecutionStrategies,
keystore: Option<SyncCryptoStorePtr>,
offchain_db: Option<Box<dyn DbExternalitiesFactory>>
) -> Self
pub fn new(
strategies: ExecutionStrategies,
keystore: Option<SyncCryptoStorePtr>,
offchain_db: Option<Box<dyn DbExternalitiesFactory>>
) -> Self
Create new ExecutionExtensions
given a keystore
and ExecutionStrategies
.
Get a reference to the execution strategies.
Set the new extensions_factory
pub fn register_transaction_pool<T>(&self, pool: &Arc<T>) where
T: OffchainSubmitTransaction<Block> + 'static,
pub fn register_transaction_pool<T>(&self, pool: &Arc<T>) where
T: OffchainSubmitTransaction<Block> + 'static,
Register transaction pool extension.
Based on the execution context and capabilities it produces the extensions object to support desired set of APIs.
pub fn manager_and_extensions<E: Debug, R: Codec>(
&self,
at: &BlockId<Block>,
context: ExecutionContext
) -> (ExecutionManager<DefaultHandler<R, E>>, Extensions)
pub fn manager_and_extensions<E: Debug, R: Codec>(
&self,
at: &BlockId<Block>,
context: ExecutionContext
) -> (ExecutionManager<DefaultHandler<R, E>>, Extensions)
Create ExecutionManager
and Extensions
for given offchain call.
Based on the execution context and capabilities it produces the right manager and extensions object to support desired set of APIs.
Trait Implementations
Auto Trait Implementations
impl<Block> !RefUnwindSafe for ExecutionExtensions<Block>
impl<Block> Send for ExecutionExtensions<Block>
impl<Block> Sync for ExecutionExtensions<Block>
impl<Block> Unpin for ExecutionExtensions<Block>
impl<Block> !UnwindSafe for ExecutionExtensions<Block>
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