pub enum ForwardEvent {
Listening {
local: SocketAddr,
guest_port: u16,
},
Forwarded {
status: u16,
upgraded: bool,
},
Refused {
status: u16,
explanation: String,
},
ConnectionError {
detail: String,
},
}Expand description
What the forwarder did, for a caller that wants to report progress.
An enum handed to a callback rather than a log line, because this crate does no logging and the CLI owns every byte the user sees. The variants are the three things worth telling somebody watching a tunnel: it is up, a request went through, or the proxy refused one for a reason worth spelling out.
Variants§
Listening
The listener is bound and accepting. Carries the address actually bound, which differs from the requested one when the caller asked for port 0.
Forwarded
One exchange completed with this status.
Refused
The proxy refused the exchange, with the distinction the status carries.
403 means the minted token’s scope does not cover guest_port; 502 means the
scope is right and nothing is listening there. Anything else is passed through
unclassified rather than guessed at.
ConnectionError
A connection ended in a way worth mentioning but not worth failing the tunnel for.
Trait Implementations§
Source§impl Clone for ForwardEvent
impl Clone for ForwardEvent
Source§fn clone(&self) -> ForwardEvent
fn clone(&self) -> ForwardEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ForwardEvent
impl RefUnwindSafe for ForwardEvent
impl Send for ForwardEvent
impl Sync for ForwardEvent
impl Unpin for ForwardEvent
impl UnsafeUnpin for ForwardEvent
impl UnwindSafe for ForwardEvent
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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> ⓘ
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> ⓘ
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