pub trait ImportQueue<B: BlockT>: Send {
// Required methods
fn service(&self) -> Box<dyn ImportQueueService<B>>;
fn service_ref(&mut self) -> &mut dyn ImportQueueService<B>;
fn poll_actions(&mut self, cx: &mut Context<'_>, link: &dyn Link<B>);
fn run<'life0, 'async_trait>(
self,
link: &'life0 dyn Link<B>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Required Methods§
Sourcefn service(&self) -> Box<dyn ImportQueueService<B>>
fn service(&self) -> Box<dyn ImportQueueService<B>>
Get a copy of the handle to ImportQueueService.
Sourcefn service_ref(&mut self) -> &mut dyn ImportQueueService<B>
fn service_ref(&mut self) -> &mut dyn ImportQueueService<B>
Get a reference to the handle to ImportQueueService.
Sourcefn poll_actions(&mut self, cx: &mut Context<'_>, link: &dyn Link<B>)
fn poll_actions(&mut self, cx: &mut Context<'_>, link: &dyn Link<B>)
This method should behave in a way similar to Future::poll. It can register the current
task and notify later when more actions are ready to be polled. To continue the comparison,
it is as if this method always returned Poll::Pending.
Sourcefn run<'life0, 'async_trait>(
self,
link: &'life0 dyn Link<B>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn run<'life0, 'async_trait>(
self,
link: &'life0 dyn Link<B>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Start asynchronous runner for import queue.
Takes an object implementing Link which allows the import queue to
influence the synchronization process.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".