[][src]Struct deeprox::proxy::Proxy

pub struct Proxy {
    pub addr: SocketAddr,
    pub auth: Option<&'static str>,
    pub key: PathBuf,
    pub cert: PathBuf,
    pub edit_request: fn(_: Request) -> BoxFuture<'static, Result<Request, ()>>,
    pub edit_response: fn(_: Response) -> BoxFuture<'static, Result<Response, ()>>,
}

Fields

addr: SocketAddrauth: Option<&'static str>key: PathBufcert: PathBufedit_request: fn(_: Request) -> BoxFuture<'static, Result<Request, ()>>edit_response: fn(_: Response) -> BoxFuture<'static, Result<Response, ()>>

Implementations

impl Proxy[src]

pub fn new(
    addr: SocketAddr,
    auth: Option<&'static str>,
    key: PathBuf,
    cert: PathBuf
) -> Self
[src]

pub fn edit_request_using(
    &mut self,
    f: fn(_: Request) -> BoxFuture<'static, Result<Request, ()>>
)
[src]

pub fn edit_response_using(
    &mut self,
    f: fn(_: Response) -> BoxFuture<'static, Result<Response, ()>>
)
[src]

pub async fn start(self) -> Result<(), Error>[src]

Auto Trait Implementations

impl RefUnwindSafe for Proxy

impl Send for Proxy

impl Sync for Proxy

impl Unpin for Proxy

impl UnwindSafe for Proxy

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Sealed<T> for T where
    T: ?Sized

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,