pub struct DynamicFixed;Expand description
Dynamically throttles for the amount of time specified in the throttle_for method using the default trait implementation. As opposed to the PreFixed, which takes a fixed delay in the constructor and throttles for that amount of time every time.
Trait Implementations§
Source§impl ThrottleStrategy for DynamicFixed
impl ThrottleStrategy for DynamicFixed
Source§fn throttle(&self, _flow_control_headers: Option<&FlowControlHeaders>)
fn throttle(&self, _flow_control_headers: Option<&FlowControlHeaders>)
Throttle the request based on optional flow control headers.
Implementers might use the headers to adjust the throttling or ignore
them altogether. Ex. strategies could be a fixed delay, random, or based
on rate limiting headers.
Source§fn strategy(&self) -> ThrottleStrategyType
fn strategy(&self) -> ThrottleStrategyType
Return strategy type
Source§fn throttle_for(&self, delay: Milliseconds)
fn throttle_for(&self, delay: Milliseconds)
Throttle for specific amount of time.
Auto Trait Implementations§
impl Freeze for DynamicFixed
impl RefUnwindSafe for DynamicFixed
impl Send for DynamicFixed
impl Sync for DynamicFixed
impl Unpin for DynamicFixed
impl UnwindSafe for DynamicFixed
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