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.
https://ngrok.com/docs/http/
sourcepub fn tcp_endpoint(&self) -> TcpTunnelBuilder
pub fn tcp_endpoint(&self) -> TcpTunnelBuilder
Start building a tunnel for a TCP endpoint.
https://ngrok.com/docs/tcp/
sourcepub fn tls_endpoint(&self) -> TlsTunnelBuilder
pub fn tls_endpoint(&self) -> TlsTunnelBuilder
Start building a tunnel for a TLS endpoint.
https://ngrok.com/docs/tls/
sourcepub fn labeled_tunnel(&self) -> LabeledTunnelBuilder
pub fn labeled_tunnel(&self) -> LabeledTunnelBuilder
Start building a labeled tunnel.
https://ngrok.com/docs/network-edge/edges/#tunnel-group
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 Freeze for Session
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more