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