Struct Intercept
struct Intercept { ... }
A matched proxy,
This is returned by a matcher if a proxy should be used.
Implementations
impl Intercept
fn uri(self: &Self) -> &UriGet the
http::Urifor the target proxy.fn basic_auth(self: &Self) -> Option<&HeaderValue>Get any configured basic authorization.
This should usually be used with a
Proxy-Authorizationheader, to send in Basic format.Example
# use Matcher; # let uri = from_static; let m = builder .all .build; let proxy = m.intercept.expect; let auth = proxy.basic_auth.expect; assert_eq!;fn raw_auth(self: &Self) -> Option<(&str, &str)>Get any configured raw authorization.
If not detected as another scheme, this is the username and password that should be sent with whatever protocol the proxy handshake uses.
Example
# use Matcher; # let uri = from_static; let m = builder .all .build; let proxy = m.intercept.expect; let auth = proxy.raw_auth.expect; assert_eq!;
impl Clone for Intercept
fn clone(self: &Self) -> Intercept
impl Debug for Intercept
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl Freeze for Intercept
impl RefUnwindSafe for Intercept
impl Send for Intercept
impl Sync for Intercept
impl Unpin for Intercept
impl UnsafeUnpin for Intercept
impl UnwindSafe for Intercept
impl<T> Any for Intercept
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for Intercept
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for Intercept
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for Intercept
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for Intercept
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Instrument for Intercept
impl<T> ToOwned for Intercept
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T> WithSubscriber for Intercept
impl<T, U> Into for Intercept
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for Intercept
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for Intercept
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>