pub struct ActiveTunnel {
pub name: String,
pub id: String,
/* private fields */
}
Expand description
Representation of a tunnel returned from the start
methods.
Fields§
§name: String
Name of the tunnel
id: String
Underlying dev tunnels ID
Implementations§
Source§impl ActiveTunnel
impl ActiveTunnel
Sourcepub async fn add_port_direct(
&mut self,
port_number: u16,
) -> Result<UnboundedReceiver<ForwardedPortConnection>, AnyError>
pub async fn add_port_direct( &mut self, port_number: u16, ) -> Result<UnboundedReceiver<ForwardedPortConnection>, AnyError>
Forwards a port to local connections.
Sourcepub async fn add_port_tcp(
&self,
port_number: u16,
privacy: PortPrivacy,
) -> Result<(), AnyError>
pub async fn add_port_tcp( &self, port_number: u16, privacy: PortPrivacy, ) -> Result<(), AnyError>
Forwards a port over TCP.
Sourcepub async fn remove_port(&self, port_number: u16) -> Result<(), AnyError>
pub async fn remove_port(&self, port_number: u16) -> Result<(), AnyError>
Removes a forwarded port TCP.
Sourcepub fn get_port_format(&self) -> Result<String, AnyError>
pub fn get_port_format(&self) -> Result<String, AnyError>
Gets the template string for forming forwarded port web URIs..
Sourcepub fn get_port_uri(&self, port: u16) -> Result<String, AnyError>
pub fn get_port_uri(&self, port: u16) -> Result<String, AnyError>
Gets the public URI on which a forwarded port can be access in browser.
Sourcepub fn status(&self) -> StatusLock
pub fn status(&self) -> StatusLock
Gets an object to read the current tunnel status.
Auto Trait Implementations§
impl Freeze for ActiveTunnel
impl !RefUnwindSafe for ActiveTunnel
impl Send for ActiveTunnel
impl Sync for ActiveTunnel
impl Unpin for ActiveTunnel
impl !UnwindSafe for ActiveTunnel
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