pub struct DefaultProxyClient { /* private fields */ }Expand description
Default implementation using ProxyProtocolClient from ap-proxy
Implementations§
Source§impl DefaultProxyClient
impl DefaultProxyClient
pub fn new(config: ProxyClientConfig) -> Self
Trait Implementations§
Source§impl ProxyClient for DefaultProxyClient
impl ProxyClient for DefaultProxyClient
Source§fn connect<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<UnboundedReceiver<IncomingMessage>, RemoteClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn connect<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<UnboundedReceiver<IncomingMessage>, RemoteClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Connect to the proxy server, returning a receiver for incoming messages
Source§fn request_rendezvous<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), RemoteClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn request_rendezvous<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), RemoteClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Request a rendezvous code from the proxy server
Source§fn request_identity<'life0, 'async_trait>(
&'life0 self,
code: RendezvousCode,
) -> Pin<Box<dyn Future<Output = Result<(), RemoteClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn request_identity<'life0, 'async_trait>(
&'life0 self,
code: RendezvousCode,
) -> Pin<Box<dyn Future<Output = Result<(), RemoteClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Request the identity associated with a rendezvous code
Source§fn send_to<'life0, 'async_trait>(
&'life0 self,
fingerprint: IdentityFingerprint,
data: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<(), RemoteClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_to<'life0, 'async_trait>(
&'life0 self,
fingerprint: IdentityFingerprint,
data: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<(), RemoteClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Send a message to a peer by their fingerprint
Source§fn disconnect<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), RemoteClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn disconnect<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), RemoteClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Disconnect from the proxy server
Auto Trait Implementations§
impl Freeze for DefaultProxyClient
impl !RefUnwindSafe for DefaultProxyClient
impl Send for DefaultProxyClient
impl Sync for DefaultProxyClient
impl Unpin for DefaultProxyClient
impl UnsafeUnpin for DefaultProxyClient
impl !UnwindSafe for DefaultProxyClient
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