pub enum ProxyRotation {
RoundRobin,
Random,
StickyPerHost,
}Expand description
Strategy for selecting a proxy from a ProxyRotator’s pool.
Variants§
RoundRobin
Cycle through the pool in order, one step per request (process-wide).
Random
Pick a uniformly random entry per request.
StickyPerHost
Pin each target host to a single proxy for the rotator’s lifetime. Default: keeps cookie/TLS sessions coherent per host (anti-bot systems flag mid-session IP changes), while still spreading load across hosts.
Trait Implementations§
Source§impl Clone for ProxyRotation
impl Clone for ProxyRotation
Source§fn clone(&self) -> ProxyRotation
fn clone(&self) -> ProxyRotation
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 moreimpl Copy for ProxyRotation
Source§impl Debug for ProxyRotation
impl Debug for ProxyRotation
Source§impl Default for ProxyRotation
impl Default for ProxyRotation
Source§fn default() -> ProxyRotation
fn default() -> ProxyRotation
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ProxyRotation
impl<'de> Deserialize<'de> for ProxyRotation
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ProxyRotation
Source§impl PartialEq for ProxyRotation
impl PartialEq for ProxyRotation
Source§fn eq(&self, other: &ProxyRotation) -> bool
fn eq(&self, other: &ProxyRotation) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ProxyRotation
impl Serialize for ProxyRotation
impl StructuralPartialEq for ProxyRotation
Auto Trait Implementations§
impl Freeze for ProxyRotation
impl RefUnwindSafe for ProxyRotation
impl Send for ProxyRotation
impl Sync for ProxyRotation
impl Unpin for ProxyRotation
impl UnsafeUnpin for ProxyRotation
impl UnwindSafe for ProxyRotation
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<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.