pub struct Config<B: Blocker, M: Monitor, H: Handler, RqC, RsC> {
pub blocker: B,
pub monitor: M,
pub handler: H,
pub mailbox_size: usize,
pub priority_request: bool,
pub request_codec: RqC,
pub priority_response: bool,
pub response_codec: RsC,
}
Expand description
Configuration for an Engine.
Fields§
§blocker: B
The commonware_p2p::Blocker that will be used to block peers from sending messages.
monitor: M
The Monitor that will be notified when a response is collected.
handler: H
The Handler that will be used to process requests.
mailbox_size: usize
The size of the mailbox for sending and receiving messages.
priority_request: bool
Whether or not to send requests with priority over other network messages.
request_codec: RqC
The commonware_codec::Codec configuration for requests.
priority_response: bool
Whether or not to send responses with priority over other network messages.
response_codec: RsC
The commonware_codec::Codec configuration for responses.
Trait Implementations§
Auto Trait Implementations§
impl<B, M, H, RqC, RsC> Freeze for Config<B, M, H, RqC, RsC>
impl<B, M, H, RqC, RsC> RefUnwindSafe for Config<B, M, H, RqC, RsC>
impl<B, M, H, RqC, RsC> Send for Config<B, M, H, RqC, RsC>
impl<B, M, H, RqC, RsC> Sync for Config<B, M, H, RqC, RsC>
impl<B, M, H, RqC, RsC> Unpin for Config<B, M, H, RqC, RsC>
impl<B, M, H, RqC, RsC> UnwindSafe for Config<B, M, H, RqC, RsC>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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