pub struct ProxyPreference {
pub preferred_protocol: String,
pub require_sticky: bool,
pub require_residential: bool,
pub max_latency_ms: Option<u64>,
}Expand description
Proxy flavour + sticky-session constraints for the playbook.
§Example
use stygian_charon::playbooks::ProxyPreference;
use stygian_charon::types::TargetClass;
let pref = ProxyPreference::default_for(TargetClass::HighSecurity);
assert!(pref.require_sticky);
assert!(pref.max_latency_ms.is_some());Fields§
§preferred_protocol: StringPreferred wire protocol ("http", "https", or "socks5").
require_sticky: boolWhether the proxy must hold a sticky IP/identity across the session.
require_residential: boolWhether the proxy must be residential (i.e. not a datacenter).
max_latency_ms: Option<u64>Optional upper bound on acceptable proxy latency (ms).
Implementations§
Source§impl ProxyPreference
impl ProxyPreference
Sourcepub fn default_for(target_class: TargetClass) -> Self
pub fn default_for(target_class: TargetClass) -> Self
Build a proxy preference appropriate for a target class.
Trait Implementations§
Source§impl Clone for ProxyPreference
impl Clone for ProxyPreference
Source§fn clone(&self) -> ProxyPreference
fn clone(&self) -> ProxyPreference
Returns a duplicate of the value. Read more
1.0.0 · 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 ProxyPreference
impl Debug for ProxyPreference
Source§impl Default for ProxyPreference
impl Default for ProxyPreference
Source§impl<'de> Deserialize<'de> for ProxyPreference
impl<'de> Deserialize<'de> for ProxyPreference
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
Source§impl PartialEq for ProxyPreference
impl PartialEq for ProxyPreference
Source§impl Serialize for ProxyPreference
impl Serialize for ProxyPreference
impl Eq for ProxyPreference
impl StructuralPartialEq for ProxyPreference
Auto Trait Implementations§
impl Freeze for ProxyPreference
impl RefUnwindSafe for ProxyPreference
impl Send for ProxyPreference
impl Sync for ProxyPreference
impl Unpin for ProxyPreference
impl UnsafeUnpin for ProxyPreference
impl UnwindSafe for ProxyPreference
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.