pub struct HttpProxyOpts { /* private fields */ }Expand description
Configuration for HTTP proxy mode.
Specifies how requests are routed and how errors are reported to clients.
Implementations§
Source§impl HttpProxyOpts
impl HttpProxyOpts
Sourcepub fn new(request_handler: impl RequestHandler + 'static) -> Self
pub fn new(request_handler: impl RequestHandler + 'static) -> Self
Creates HTTP proxy options with the given request handler.
Sourcepub fn error_responder(self, writer: impl ErrorResponder + 'static) -> Self
pub fn error_responder(self, writer: impl ErrorResponder + 'static) -> Self
Sets a custom error response generator.
When proxy errors occur, this responder generates the HTTP response sent to the client. If not set, a minimal empty response is used.
Trait Implementations§
Source§impl Clone for HttpProxyOpts
impl Clone for HttpProxyOpts
Source§fn clone(&self) -> HttpProxyOpts
fn clone(&self) -> HttpProxyOpts
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for HttpProxyOpts
impl !RefUnwindSafe for HttpProxyOpts
impl Send for HttpProxyOpts
impl Sync for HttpProxyOpts
impl Unpin for HttpProxyOpts
impl UnsafeUnpin for HttpProxyOpts
impl !UnwindSafe for HttpProxyOpts
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