Skip to main content

Route

Struct Route 

Source
pub struct Route { /* private fields */ }

Implementations§

Source§

impl Route

Source

pub fn new(target: Url, proxy: Option<Url>) -> Self

Source

pub fn resolve(&self) -> TransportRequest

Source

pub fn proxy_tls(&self) -> Option<TransportRequest>

For an https:// proxy, the TLS upgrade to the proxy itself. It comes first, right after the connection is established: the CONNECT tunnel or the absolute-form request then runs inside it, and an https target’s own TLS session nests within that tunnel.

Source

pub fn connect_head(&self, authorization: Option<&[u8]>) -> Option<Head>

Source

pub fn request_head( &self, request: &Request, authorization: Option<&[u8]>, ) -> Head

Serialize origin-form for direct/tunnel traffic and absolute-form for HTTP proxies. Proxy credentials are never forwarded inside an HTTPS tunnel.

Source

pub fn tunnel_response(&mut self, status: u16) -> Result<TransportRequest>

Source

pub fn connected(&self) -> Option<TransportRequest>

Auto Trait Implementations§

§

impl Forget for Route

§

impl Freeze for Route

§

impl RefUnwindSafe for Route

§

impl Send for Route

§

impl Sync for Route

§

impl Unpin for Route

§

impl UnsafeUnpin for Route

§

impl UnwindSafe for Route

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.