Struct fuel_core_sync::import::Import
source · pub struct Import<P, E, C> { /* private fields */ }Expand description
The combination of shared state, configuration, and services that define import behavior.
Implementations§
source§impl<P, E, C> Import<P, E, C>
impl<P, E, C> Import<P, E, C>
sourcepub fn new(
state: SharedMutex<State>,
notify: Arc<Notify>,
params: Config,
p2p: Arc<P>,
executor: Arc<E>,
consensus: Arc<C>
) -> Self
pub fn new( state: SharedMutex<State>, notify: Arc<Notify>, params: Config, p2p: Arc<P>, executor: Arc<E>, consensus: Arc<C> ) -> Self
Configure an import behavior from a shared state, configuration and services that can be executed by an ImportTask.
sourcepub fn notify_one(&self)
pub fn notify_one(&self)
Signal other asynchronous tasks that an import event has occurred.
source§impl<P, E, C> Import<P, E, C>where
P: PeerToPeerPort + Send + Sync + 'static,
E: BlockImporterPort + Send + Sync + 'static,
C: ConsensusPort + Send + Sync + 'static,
impl<P, E, C> Import<P, E, C>where
P: PeerToPeerPort + Send + Sync + 'static,
E: BlockImporterPort + Send + Sync + 'static,
C: ConsensusPort + Send + Sync + 'static,
sourcepub async fn import(&self, shutdown: &mut StateWatcher) -> Result<bool>
pub async fn import(&self, shutdown: &mut StateWatcher) -> Result<bool>
Execute imports until a shutdown is requested.
Auto Trait Implementations§
impl<P, E, C> Freeze for Import<P, E, C>
impl<P, E, C> !RefUnwindSafe for Import<P, E, C>
impl<P, E, C> Send for Import<P, E, C>
impl<P, E, C> Sync for Import<P, E, C>
impl<P, E, C> Unpin for Import<P, E, C>
impl<P, E, C> !UnwindSafe for Import<P, E, C>
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
Mutably borrows from an owned value. Read more