pub struct ProxyRequest {
pub country: Option<String>,
pub tier: Option<ProxyTier>,
pub asn: Option<String>,
pub session: Option<String>,
pub session_duration: Option<u32>,
pub state: Option<String>,
pub city: Option<String>,
}Expand description
Managed proxy egress request.
Fields§
§country: Option<String>ISO-3166-1 alpha-2, lowercase. Defaults to "us" server-side.
tier: Option<ProxyTier>Proxy tier. Defaults to ProxyTier::Residential server-side.
asn: Option<String>Pin egress to a specific ASN (e.g. "20057" for AT&T Mobility).
session: Option<String>Sticky-session label: any 1-128 characters (the gateway turns it into a stable id for the proxy vendor). The same label
gets the same egress IP for session_duration minutes.
session_duration: Option<u32>Sticky lifetime in minutes (1-30, default 10). Only with session.
state: Option<String>US-only geo narrowing (e.g. "california").
city: Option<String>US-only city pin (e.g. "los_angeles").
Implementations§
Source§impl ProxyRequest
impl ProxyRequest
pub fn tier(self, tier: ProxyTier) -> Self
pub fn asn(self, asn: impl Into<String>) -> Self
Sourcepub fn session(self, id: impl Into<String>) -> Self
pub fn session(self, id: impl Into<String>) -> Self
Pin the egress IP under a sticky-session id.
pub fn session_duration(self, minutes: u32) -> Self
pub fn state(self, state: impl Into<String>) -> Self
pub fn city(self, city: impl Into<String>) -> Self
Trait Implementations§
Source§impl Clone for ProxyRequest
impl Clone for ProxyRequest
Source§impl Debug for ProxyRequest
impl Debug for ProxyRequest
Source§impl Default for ProxyRequest
impl Default for ProxyRequest
Source§impl From<ProxyRequest> for ProxySpec
impl From<ProxyRequest> for ProxySpec
Source§fn from(r: ProxyRequest) -> Self
fn from(r: ProxyRequest) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Forget for ProxyRequest
impl Freeze for ProxyRequest
impl Move for ProxyRequest
impl RefUnwindSafe for ProxyRequest
impl Send for ProxyRequest
impl Sync for ProxyRequest
impl Unpin for ProxyRequest
impl UnsafeUnpin for ProxyRequest
impl UnwindSafe for ProxyRequest
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