pub enum PortMappingStage {
Show 18 variants
Standby,
WaitingForDirect,
Discovering,
GatewayFound,
Discovered,
Requesting,
Active,
Renewing,
Expired,
Retrying,
NetworkChanged,
Releasing,
Released,
ReleaseSent,
Failed,
ReleaseFailed,
Cancelled,
Stopped,
}Expand description
Where a gateway mapping stands. A lease outlives some stages: whether one
is usable right now is PortMappingStatus::active.
Variants§
Standby
Asked for when needed (PortMapping::Auto): starts if a direct
attempt fails to punch through, which none has.
WaitingForDirect
Requested; starts with the tunnel’s first direct session, when its UDP endpoint opens.
Discovering
Looking for the default gateway and the protocols it speaks.
GatewayFound
Found the gateway.
Discovered
Learned which of PCP, NAT-PMP and UPnP the gateway speaks.
Requesting
Asking the gateway for a mapping.
Active
The gateway granted a lease.
Renewing
Extending the lease, which stays usable meanwhile.
Expired
The lease ran out before it was renewed.
Retrying
No lease yet; asking again, 30 s after the first time and then less often, up to every 10 min.
NetworkChanged
The local network changed; the gateway is looked for again.
Releasing
Asking the gateway to delete the lease.
Released
The gateway confirmed the deletion (UPnP).
ReleaseSent
The deletion was sent; PCP and NAT-PMP do not acknowledge it.
Failed
Discovery or a request failed; see PortMappingStatus::error.
ReleaseFailed
The lease could not be deleted and may stay until it expires.
Cancelled
An operation was abandoned before it finished.
Stopped
The mapping stopped with its tunnel.
Implementations§
Trait Implementations§
Source§impl Clone for PortMappingStage
impl Clone for PortMappingStage
Source§fn clone(&self) -> PortMappingStage
fn clone(&self) -> PortMappingStage
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for PortMappingStage
Source§impl Debug for PortMappingStage
impl Debug for PortMappingStage
impl Eq for PortMappingStage
Source§impl PartialEq for PortMappingStage
impl PartialEq for PortMappingStage
Source§impl Serialize for PortMappingStage
impl Serialize for PortMappingStage
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for PortMappingStage
Auto Trait Implementations§
impl Freeze for PortMappingStage
impl RefUnwindSafe for PortMappingStage
impl Send for PortMappingStage
impl Sync for PortMappingStage
impl Unpin for PortMappingStage
impl UnsafeUnpin for PortMappingStage
impl UnwindSafe for PortMappingStage
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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