pub struct EngineBuilder { /* private fields */ }Implementations§
Source§impl EngineBuilder
impl EngineBuilder
Sourcepub fn provider(
self,
provider: Arc<dyn Provider>,
policy: ResiliencePolicy,
priority: i32,
) -> Self
pub fn provider( self, provider: Arc<dyn Provider>, policy: ResiliencePolicy, priority: i32, ) -> Self
Registers a provider. Lower priority is tried first; ties keep
registration order.
Sourcepub fn jitter(self, jitter: Jitter) -> Self
pub fn jitter(self, jitter: Jitter) -> Self
Replaces the backoff jitter source (for deterministic tests).
Sourcepub fn cache(self, cache: Arc<dyn Cache>) -> Self
pub fn cache(self, cache: Arc<dyn Cache>) -> Self
Caches provider answers (and serves them stale if a provider fails).
pub fn cache_policy(self, policy: CachePolicy) -> Self
Sourcepub fn clock(self, clock: Clock) -> Self
pub fn clock(self, clock: Clock) -> Self
Replaces the clock (for deterministic cache-expiry tests).
pub fn build(self) -> Engine
Auto Trait Implementations§
impl !RefUnwindSafe for EngineBuilder
impl !UnwindSafe for EngineBuilder
impl Forget for EngineBuilder
impl Freeze for EngineBuilder
impl Send for EngineBuilder
impl Sync for EngineBuilder
impl Unpin for EngineBuilder
impl UnsafeUnpin for EngineBuilder
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