pub struct ProxyFacade { /* private fields */ }
Implementations§
Source§impl ProxyFacade
impl ProxyFacade
pub fn new() -> Self
Sourcepub async fn open_proxy(
&self,
target_port: u16,
proxy_port: u16,
) -> Result<u16, Error>
pub async fn open_proxy( &self, target_port: u16, proxy_port: u16, ) -> Result<u16, Error>
Opens an externally accessible proxy to target_port. Returns the port with which to access the proxy. In case a proxy to |target_port| is already open, the proxy is reused.
Sourcepub async fn drop_proxy(&self, target_port: u16)
pub async fn drop_proxy(&self, target_port: u16)
Indicate that the proxy to |target_port| is no longer needed. The proxy is
stopped once all clients that requested the proxy call drop_proxy
. Note
that this means the proxy may still be running after a call to drop_proxy
.
Sourcepub async fn stop_all_proxies(&self)
pub async fn stop_all_proxies(&self)
Forcibly stop all proxies, regardless of whether or not any clients are still using them. This method is intended for cleanup after a test.
Trait Implementations§
Source§impl Debug for ProxyFacade
impl Debug for ProxyFacade
Source§impl Facade for ProxyFacade
impl Facade for ProxyFacade
Source§fn handle_request<'life0, 'async_trait>(
&'life0 self,
method: String,
args: Value,
) -> Pin<Box<dyn Future<Output = Result<Value, Error>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn handle_request<'life0, 'async_trait>(
&'life0 self,
method: String,
args: Value,
) -> Pin<Box<dyn Future<Output = Result<Value, Error>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Asynchronously handle the incoming request for the given method and arguments, returning a
future object representing the pending operation.
Auto Trait Implementations§
impl !Freeze for ProxyFacade
impl !RefUnwindSafe for ProxyFacade
impl Send for ProxyFacade
impl Sync for ProxyFacade
impl Unpin for ProxyFacade
impl !UnwindSafe for ProxyFacade
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, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> OptionalField for Twhere
T: ?Sized,
impl<T> OptionalField for Twhere
T: ?Sized,
§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T, U> TryIntoExt<U> for Twhere
U: TryFromExt<T>,
impl<T, U> TryIntoExt<U> for Twhere
U: TryFromExt<T>,
type Error = <U as TryFromExt<T>>::Error
Source§fn try_into_ext(self) -> Result<U, <T as TryIntoExt<U>>::Error>
fn try_into_ext(self) -> Result<U, <T as TryIntoExt<U>>::Error>
Tries to perform the conversion.