pub struct Engine<E, P, M, D>where
E: BufferPooler + Clock + Spawner + Metrics,
P: PublicKey,
M: Digestible + Codec,
D: Provider<PublicKey = P>,{ /* private fields */ }Expand description
Instance of the main engine for the module.
It is responsible for:
- Broadcasting messages to the network
- Receiving messages from the network
- Storing messages in the cache
- Responding to requests from the application
Implementations§
Source§impl<E, P, M, D> Engine<E, P, M, D>where
E: BufferPooler + Clock + Spawner + Metrics,
P: PublicKey,
M: Digestible + Codec,
D: Provider<PublicKey = P>,
impl<E, P, M, D> Engine<E, P, M, D>where
E: BufferPooler + Clock + Spawner + Metrics,
P: PublicKey,
M: Digestible + Codec,
D: Provider<PublicKey = P>,
Auto Trait Implementations§
impl<E, P, M, D> !RefUnwindSafe for Engine<E, P, M, D>
impl<E, P, M, D> !UnwindSafe for Engine<E, P, M, D>
impl<E, P, M, D> Freeze for Engine<E, P, M, D>where
Cell<E>: Freeze,
P: Freeze,
<M as Read>::Cfg: Freeze,
Receiver<Message<P, M>>: Freeze,
BTreeMap<<M as Digestible>::Digest, Vec<Waiter<M>>>: Freeze,
D: Freeze,
BTreeMap<<M as Digestible>::Digest, Arc<M>>: Freeze,
BTreeMap<P, VecDeque<<M as Digestible>::Digest>>: Freeze,
BTreeMap<<M as Digestible>::Digest, usize>: Freeze,
Set<P>: Freeze,
Metrics<P>: Freeze,
impl<E, P, M, D> Send for Engine<E, P, M, D>where
Cell<E>: Send,
<M as Read>::Cfg: Send,
Receiver<Message<P, M>>: Send,
BTreeMap<<M as Digestible>::Digest, Vec<Waiter<M>>>: Send,
BTreeMap<<M as Digestible>::Digest, Arc<M>>: Send,
BTreeMap<P, VecDeque<<M as Digestible>::Digest>>: Send,
BTreeMap<<M as Digestible>::Digest, usize>: Send,
Set<P>: Send,
Metrics<P>: Send,
impl<E, P, M, D> Sync for Engine<E, P, M, D>where
Cell<E>: Sync,
<M as Read>::Cfg: Sync,
Receiver<Message<P, M>>: Sync,
BTreeMap<<M as Digestible>::Digest, Vec<Waiter<M>>>: Sync,
D: Sync,
BTreeMap<<M as Digestible>::Digest, Arc<M>>: Sync,
BTreeMap<P, VecDeque<<M as Digestible>::Digest>>: Sync,
BTreeMap<<M as Digestible>::Digest, usize>: Sync,
Set<P>: Sync,
Metrics<P>: Sync,
impl<E, P, M, D> Unpin for Engine<E, P, M, D>where
Cell<E>: Unpin,
P: Unpin,
<M as Read>::Cfg: Unpin,
Receiver<Message<P, M>>: Unpin,
BTreeMap<<M as Digestible>::Digest, Vec<Waiter<M>>>: Unpin,
D: Unpin,
BTreeMap<<M as Digestible>::Digest, Arc<M>>: Unpin,
BTreeMap<P, VecDeque<<M as Digestible>::Digest>>: Unpin,
BTreeMap<<M as Digestible>::Digest, usize>: Unpin,
Set<P>: Unpin,
Metrics<P>: Unpin,
impl<E, P, M, D> UnsafeUnpin for Engine<E, P, M, D>where
Cell<E>: UnsafeUnpin,
P: UnsafeUnpin,
<M as Read>::Cfg: UnsafeUnpin,
Receiver<Message<P, M>>: UnsafeUnpin,
BTreeMap<<M as Digestible>::Digest, Vec<Waiter<M>>>: UnsafeUnpin,
D: UnsafeUnpin,
BTreeMap<<M as Digestible>::Digest, Arc<M>>: UnsafeUnpin,
BTreeMap<P, VecDeque<<M as Digestible>::Digest>>: UnsafeUnpin,
BTreeMap<<M as Digestible>::Digest, usize>: UnsafeUnpin,
Set<P>: UnsafeUnpin,
Metrics<P>: UnsafeUnpin,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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