pub struct DevTunnels { /* private fields */ }
Implementations§
Source§impl DevTunnels
impl DevTunnels
Sourcepub fn new_port_forwarding(
log: &Logger,
auth: Auth,
paths: &LauncherPaths,
) -> DevTunnels
pub fn new_port_forwarding( log: &Logger, auth: Auth, paths: &LauncherPaths, ) -> DevTunnels
Creates a new DevTunnels client used for port forwarding.
Sourcepub fn new_remote_tunnel(
log: &Logger,
auth: Auth,
paths: &LauncherPaths,
) -> DevTunnels
pub fn new_remote_tunnel( log: &Logger, auth: Auth, paths: &LauncherPaths, ) -> DevTunnels
Creates a new DevTunnels client used for the Remote Tunnels extension to access the VS Code Server.
pub async fn remove_tunnel(&mut self) -> Result<(), AnyError>
Sourcepub async fn rename_tunnel(&mut self, name: &str) -> Result<(), AnyError>
pub async fn rename_tunnel(&mut self, name: &str) -> Result<(), AnyError>
Renames the current tunnel to the new name.
Sourcepub async fn start_new_launcher_tunnel(
&mut self,
preferred_name: Option<&str>,
use_random_name: bool,
preserve_ports: &[u16],
) -> Result<ActiveTunnel, AnyError>
pub async fn start_new_launcher_tunnel( &mut self, preferred_name: Option<&str>, use_random_name: bool, preserve_ports: &[u16], ) -> Result<ActiveTunnel, AnyError>
Starts a new tunnel for the code server on the port. Unlike start_new_tunnel
,
this attempts to reuse or create a tunnel of a preferred name or of a generated friendly tunnel name.
Sourcepub async fn start_existing_tunnel(
&mut self,
tunnel: ExistingTunnel,
) -> Result<ActiveTunnel, AnyError>
pub async fn start_existing_tunnel( &mut self, tunnel: ExistingTunnel, ) -> Result<ActiveTunnel, AnyError>
Hosts an existing tunnel, where the tunnel ID and host token are given.
Trait Implementations§
Source§impl Clone for DevTunnels
impl Clone for DevTunnels
Source§fn clone(&self) -> DevTunnels
fn clone(&self) -> DevTunnels
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl !Freeze for DevTunnels
impl !RefUnwindSafe for DevTunnels
impl Send for DevTunnels
impl Sync for DevTunnels
impl Unpin for DevTunnels
impl !UnwindSafe for DevTunnels
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