pub struct Session { /* private fields */ }
Expand description
An ngrok session.
Encapsulates an established session with the ngrok service. Sessions recover from network failures by automatically reconnecting.
Implementations§
source§impl Session
impl Session
sourcepub fn builder() -> SessionBuilder
pub fn builder() -> SessionBuilder
Create a new SessionBuilder to configure a new ngrok session.
sourcepub fn http_endpoint(&self) -> HttpTunnelBuilder
pub fn http_endpoint(&self) -> HttpTunnelBuilder
Start building a tunnel for an HTTP endpoint.
sourcepub fn tcp_endpoint(&self) -> TcpTunnelBuilder
pub fn tcp_endpoint(&self) -> TcpTunnelBuilder
Start building a tunnel for a TCP endpoint.
sourcepub fn tls_endpoint(&self) -> TlsTunnelBuilder
pub fn tls_endpoint(&self) -> TlsTunnelBuilder
Start building a tunnel for a TLS endpoint.
sourcepub fn labeled_tunnel(&self) -> LabeledTunnelBuilder
pub fn labeled_tunnel(&self) -> LabeledTunnelBuilder
Start building a labeled tunnel.
Trait Implementations§
source§impl From<Session> for HttpTunnelBuilder
impl From<Session> for HttpTunnelBuilder
source§impl From<Session> for LabeledTunnelBuilder
impl From<Session> for LabeledTunnelBuilder
source§impl From<Session> for TcpTunnelBuilder
impl From<Session> for TcpTunnelBuilder
Auto Trait Implementations§
impl !RefUnwindSafe for Session
impl Send for Session
impl Sync for Session
impl Unpin for Session
impl !UnwindSafe for Session
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