pub enum ProxySpec {
Shorthand(String),
Request(ProxyRequest),
}Expand description
What to send as the proxy field of POST /sessions.
Mirrors the TS union string | ProxyRequest | "off" | "smart":
ProxySpec::country("us"); // proxy: "us"
ProxySpec::off(); // proxy: "off"
ProxySpec::smart(); // proxy: "smart"
ProxySpec::from(ProxyRequest::country("us").tier(ProxyTier::Static));Variants§
Shorthand(String)
A bare string: a country code, or the literals "off" / "smart".
Request(ProxyRequest)
A full egress request object.
Implementations§
Trait Implementations§
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 ProxySpec
impl Freeze for ProxySpec
impl Move for ProxySpec
impl RefUnwindSafe for ProxySpec
impl Send for ProxySpec
impl Sync for ProxySpec
impl Unpin for ProxySpec
impl UnsafeUnpin for ProxySpec
impl UnwindSafe for ProxySpec
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