pub struct Config {
pub enabled: bool,
pub request_timeout: Duration,
pub max_request_size: usize,
pub max_response_size: usize,
pub parallel_requests: usize,
pub scoring_strategy: Strategy,
pub inactive_threshold: Option<Duration>,
pub batch_size: usize,
}Fields§
§enabled: bool§request_timeout: Duration§max_request_size: usize§max_response_size: usize§parallel_requests: usize§scoring_strategy: Strategy§inactive_threshold: Option<Duration>§batch_size: usizeImplementations§
Source§impl Config
impl Config
pub fn new(enabled: bool) -> Self
pub fn with_request_timeout(self, request_timeout: Duration) -> Self
pub fn with_max_request_size(self, max_request_size: usize) -> Self
pub fn with_max_response_size(self, max_response_size: usize) -> Self
pub fn with_parallel_requests(self, parallel_requests: usize) -> Self
pub fn with_scoring_strategy(self, scoring_strategy: Strategy) -> Self
pub fn with_inactive_threshold( self, inactive_threshold: Option<Duration>, ) -> Self
pub fn with_batch_size(self, batch_size: usize) -> Self
Trait Implementations§
impl Copy for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> 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