pub enum ProxyKind {
Http(ProxyTarget),
Unsupported {
scheme: String,
},
}Expand description
Outcome of parsing a proxy URL prior to opening a tunnel.
SOCKS schemes are recognized but not implemented for the WebSocket path
yet. They are surfaced as ProxyKind::Unsupported so callers can log
a warning and fall back to a direct connection, preserving compatibility
with REST configs that already pointed at a SOCKS proxy.
Variants§
Http(ProxyTarget)
HTTP / HTTPS forward proxy reachable via CONNECT tunneling.
Unsupported
Recognized scheme without a working tunnel (currently SOCKS).
Implementations§
Source§impl ProxyKind
impl ProxyKind
Sourcepub fn parse(url: &str) -> Result<Self, TransportError>
pub fn parse(url: &str) -> Result<Self, TransportError>
Parse a proxy URL into a ProxyKind. Returns
TransportError::InvalidUrl for malformed input or non-proxy
schemes (ftp://, ws://, etc.).
§Errors
See ProxyTarget::parse for the underlying validation.
Trait Implementations§
impl Eq for ProxyKind
impl StructuralPartialEq for ProxyKind
Auto Trait Implementations§
impl Freeze for ProxyKind
impl RefUnwindSafe for ProxyKind
impl Send for ProxyKind
impl Sync for ProxyKind
impl Unpin for ProxyKind
impl UnsafeUnpin for ProxyKind
impl UnwindSafe for ProxyKind
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
Checks if this value is equivalent to the given key. Read more
§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.§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
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more