pub struct Config<P: PublicKey, C: Provider<PublicKey = P>, B: Blocker<PublicKey = P>> {
pub public_key: P,
pub provider: C,
pub blocker: B,
pub mailbox_size: usize,
pub initial: Duration,
pub timeout: Duration,
pub fetch_retry_timeout: Duration,
pub priority_requests: bool,
pub priority_responses: bool,
}Expand description
Configuration for the P2P Resolver.
Fields§
§public_key: PThe public key to identify this node.
provider: CThe provider of peers that can be consulted for fetching data.
blocker: BThe blocker that will be used to block peers that send invalid responses.
mailbox_size: usizeThe size of the request mailbox backlog.
initial: DurationInitial expected performance for new participants.
timeout: DurationTimeout for requests.
fetch_retry_timeout: DurationRetry timeout for the fetcher.
priority_requests: boolWhether requests are sent with priority over other network messages
priority_responses: boolWhether responses are sent with priority over other network messages
Auto Trait Implementations§
impl<P, C, B> Freeze for Config<P, C, B>
impl<P, C, B> RefUnwindSafe for Config<P, C, B>
impl<P, C, B> Send for Config<P, C, B>
impl<P, C, B> Sync for Config<P, C, B>
impl<P, C, B> Unpin for Config<P, C, B>
impl<P, C, B> UnwindSafe for Config<P, C, B>
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> 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