pub struct ProxyRouter { /* private fields */ }๐Deprecated:
Use mockforge_proxy crate directly
Expand description
Proxy router for determining if a request should be proxied
Implementationsยง
Sourceยงimpl ProxyRouter
impl ProxyRouter
Sourcepub fn new() -> Self
๐Deprecated: Use mockforge_proxy crate directly
pub fn new() -> Self
Use mockforge_proxy crate directly
Create a new proxy router
Sourcepub fn add_proxy_route(&mut self, route: Route) -> Result<()>
๐Deprecated: Use mockforge_proxy crate directly
pub fn add_proxy_route(&mut self, route: Route) -> Result<()>
Use mockforge_proxy crate directly
Add a route that should be proxied
Sourcepub fn should_proxy(&self, method: &HttpMethod, path: &str) -> bool
๐Deprecated: Use mockforge_proxy crate directly
pub fn should_proxy(&self, method: &HttpMethod, path: &str) -> bool
Use mockforge_proxy crate directly
Check if a request should be proxied
Sourcepub fn get_target_url(
&self,
method: &HttpMethod,
path: &str,
base_url: &str,
) -> Option<String>
๐Deprecated: Use mockforge_proxy crate directly
pub fn get_target_url( &self, method: &HttpMethod, path: &str, base_url: &str, ) -> Option<String>
Use mockforge_proxy crate directly
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