pub struct RunningProxy {
pub running_nodes: Vec<RunningNode>,
/* private fields */
}
Expand description
A handle that can be used to stop the proxy or change the rules.
Fields§
§running_nodes: Vec<RunningNode>
Implementations§
Source§impl RunningProxy
impl RunningProxy
Sourcepub fn turn_off_rules(&mut self)
pub fn turn_off_rules(&mut self)
Disables all the rules in the proxy, effectively making it a pass-through-only proxy.
Sourcepub fn sanity_check(&mut self) -> Result<(), ProxyError>
pub fn sanity_check(&mut self) -> Result<(), ProxyError>
Attempts to fetch the first error that has occurred in proxy since last check. If no errors occurred, returns Ok(()).
Sourcepub async fn wait_for_error(&mut self) -> Option<ProxyError>
pub async fn wait_for_error(&mut self) -> Option<ProxyError>
Waits until an error occurs in proxy. If proxy finishes with no errors occurred, returns Err(()).
Sourcepub async fn finish(self) -> Result<(), ProxyError>
pub async fn finish(self) -> Result<(), ProxyError>
Requests termination of all proxy workers and awaits its completion. Returns the first error that occurred in proxy.
Auto Trait Implementations§
impl Freeze for RunningProxy
impl RefUnwindSafe for RunningProxy
impl Send for RunningProxy
impl Sync for RunningProxy
impl Unpin for RunningProxy
impl UnwindSafe for RunningProxy
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