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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more