pub struct Config<P: PublicKey, D: Manager<PublicKey = P>, Key: Span, Con: Consumer<Key = Key, Value = Bytes, Failure = ()>, Pro: Producer<Key = Key>> {
pub manager: D,
pub consumer: Con,
pub producer: Pro,
pub mailbox_size: usize,
pub requester_config: Config<P>,
pub fetch_retry_timeout: Duration,
pub priority_requests: bool,
pub priority_responses: bool,
}Expand description
Configuration for the peer actor.
Fields§
§manager: DManages the current set of peers
consumer: ConThe consumer that gets notified when data is available
producer: ProThe producer that serves data requests
mailbox_size: usizeThe maximum size of the mailbox backlog
requester_config: Config<P>Configuration for the requester
fetch_retry_timeout: DurationHow long fetches remain in the pending queue before being retried
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, D, Key, Con, Pro> Freeze for Config<P, D, Key, Con, Pro>
impl<P, D, Key, Con, Pro> RefUnwindSafe for Config<P, D, Key, Con, Pro>
impl<P, D, Key, Con, Pro> Send for Config<P, D, Key, Con, Pro>
impl<P, D, Key, Con, Pro> Sync for Config<P, D, Key, Con, Pro>
impl<P, D, Key, Con, Pro> Unpin for Config<P, D, Key, Con, Pro>
impl<P, D, Key, Con, Pro> UnwindSafe for Config<P, D, Key, Con, Pro>
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