pub struct TunnelClient<S> { /* private fields */ }Expand description
A typed client for the tunnel registration interface.
Wraps an RpcClient and exposes only plain Rust types so the caller
never touches Cap’n Proto directly.
Implementations§
Source§impl<S: AsyncStream + Unpin> TunnelClient<S>
impl<S: AsyncStream + Unpin> TunnelClient<S>
Sourcepub async fn bootstrap(&mut self) -> Result<(), RpcError>
pub async fn bootstrap(&mut self) -> Result<(), RpcError>
Bootstraps the edge’s registration interface.
Sourcepub async fn register_connection(
&mut self,
auth: TunnelAuth,
tunnel_identifier: &[u8],
connection_index: u8,
options: &ConnectionOptions,
) -> Result<ConnectionResponse, RpcError>
pub async fn register_connection( &mut self, auth: TunnelAuth, tunnel_identifier: &[u8], connection_index: u8, options: &ConnectionOptions, ) -> Result<ConnectionResponse, RpcError>
Calls registerConnection with the tunnel credentials and options.
Sourcepub async fn unregister_connection(&mut self) -> Result<(), RpcError>
pub async fn unregister_connection(&mut self) -> Result<(), RpcError>
Calls unregisterConnection for the current connection.
Sourcepub async fn update_local_configuration(
&mut self,
configuration: &[u8],
) -> Result<(), RpcError>
pub async fn update_local_configuration( &mut self, configuration: &[u8], ) -> Result<(), RpcError>
Pushes the local configuration to the edge via
updateLocalConfiguration (for locally-managed tunnels).
Sourcepub fn into_inner(self) -> RpcClient<S>
pub fn into_inner(self) -> RpcClient<S>
Returns the underlying RpcClient without releasing the
registration capability.
Auto Trait Implementations§
impl<S> Freeze for TunnelClient<S>
impl<S> RefUnwindSafe for TunnelClient<S>where
RpcClient<S>: RefUnwindSafe,
impl<S> Send for TunnelClient<S>
impl<S> Sync for TunnelClient<S>
impl<S> Unpin for TunnelClient<S>
impl<S> UnsafeUnpin for TunnelClient<S>where
RpcClient<S>: UnsafeUnpin,
impl<S> UnwindSafe for TunnelClient<S>where
RpcClient<S>: UnwindSafe,
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