pub struct ProxyRouter { /* private fields */ }๐Deprecated:
Will be extracted to mockforge-proxy crate
Expand description
Proxy router for determining if a request should be proxied
Implementationsยง
Sourceยงimpl ProxyRouter
impl ProxyRouter
Sourcepub fn new() -> Self
๐Deprecated: Will be extracted to mockforge-proxy crate
pub fn new() -> Self
Will be extracted to mockforge-proxy crate
Create a new proxy router
Sourcepub fn add_proxy_route(&mut self, route: Route) -> Result<()>
๐Deprecated: Will be extracted to mockforge-proxy crate
pub fn add_proxy_route(&mut self, route: Route) -> Result<()>
Will be extracted to mockforge-proxy crate
Add a route that should be proxied
Sourcepub fn should_proxy(&self, method: &HttpMethod, path: &str) -> bool
๐Deprecated: Will be extracted to mockforge-proxy crate
pub fn should_proxy(&self, method: &HttpMethod, path: &str) -> bool
Will be extracted to mockforge-proxy crate
Check if a request should be proxied
Sourcepub fn get_target_url(
&self,
method: &HttpMethod,
path: &str,
base_url: &str,
) -> Option<String>
๐Deprecated: Will be extracted to mockforge-proxy crate
pub fn get_target_url( &self, method: &HttpMethod, path: &str, base_url: &str, ) -> Option<String>
Will be extracted to mockforge-proxy crate
Get the target URL for a proxied request
Trait Implementationsยง
Auto Trait Implementationsยง
impl Freeze for ProxyRouter
impl RefUnwindSafe for ProxyRouter
impl Send for ProxyRouter
impl Sync for ProxyRouter
impl Unpin for ProxyRouter
impl UnsafeUnpin for ProxyRouter
impl UnwindSafe for ProxyRouter
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
Sourceยงimpl<T> Instrument for T
impl<T> Instrument for T
Sourceยงfn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Sourceยงfn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Sourceยงimpl<T> IntoEither for T
impl<T> IntoEither for T
Sourceยงfn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSourceยงfn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more