Struct Intercept
pub struct Intercept { /* private fields */ }
A matched proxy,
This is returned by a matcher if a proxy should be used.
Implementations
impl Intercept
fn uri(&self) -> &UriGet the
http::Urifor the target proxy.fn basic_auth(&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) -> 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!;
Trait Implementations
impl Clone for Intercept
fn clone(&self) -> Intercept
impl Debug for Intercept
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Auto Trait Implementations
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
Blanket Implementations
impl<T> Any for Intercept
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for Intercept
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for Intercept
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for Intercept
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for Intercept
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Instrument for Intercept
impl<T> ToOwned for Intercept
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T> WithSubscriber for Intercept
impl<T, U> Into<U> for Intercept
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for Intercept
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for Intercept
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>