pub struct FanoutPolicy { /* private fields */ }Expand description
Bounds for concurrent target execution.
Implementations§
Source§impl FanoutPolicy
impl FanoutPolicy
Sourcepub fn new(
max_concurrency: usize,
per_target_timeout: Duration,
) -> Result<Self, FanoutPolicyError>
pub fn new( max_concurrency: usize, per_target_timeout: Duration, ) -> Result<Self, FanoutPolicyError>
Creates a bounded fanout policy.
Sourcepub const fn max_concurrency(self) -> usize
pub const fn max_concurrency(self) -> usize
Returns maximum in-flight targets.
Sourcepub const fn per_target_timeout(self) -> Duration
pub const fn per_target_timeout(self) -> Duration
Returns the timeout applied after one target begins execution.
Trait Implementations§
Source§impl Clone for FanoutPolicy
impl Clone for FanoutPolicy
Source§fn clone(&self) -> FanoutPolicy
fn clone(&self) -> FanoutPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FanoutPolicy
impl Debug for FanoutPolicy
Source§impl PartialEq for FanoutPolicy
impl PartialEq for FanoutPolicy
Source§fn eq(&self, other: &FanoutPolicy) -> bool
fn eq(&self, other: &FanoutPolicy) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for FanoutPolicy
impl Eq for FanoutPolicy
impl StructuralPartialEq for FanoutPolicy
Auto Trait Implementations§
impl Freeze for FanoutPolicy
impl RefUnwindSafe for FanoutPolicy
impl Send for FanoutPolicy
impl Sync for FanoutPolicy
impl Unpin for FanoutPolicy
impl UnsafeUnpin for FanoutPolicy
impl UnwindSafe for FanoutPolicy
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.