pub struct PortMapping {
pub protocol: MapProtocol,
pub external_ip: IpAddr,
pub external_port: u16,
pub internal_port: u16,
pub lifetime_s: u32,
pub routable: bool,
/* private fields */
}Expand description
An external ip:port the router agreed to forward to us.
Fields§
§protocol: MapProtocol§external_ip: IpAddr§external_port: u16§internal_port: u16§lifetime_s: u32Seconds; 0 means the router calls it permanent.
routable: boolWhether external_ip is reachable from the public internet. A router
under double NAT or CGNAT installs the mapping and reports an address
nobody can route to; the mapping is still useful (it removes the inner
NAT from the path) but must not be advertised.
Trait Implementations§
Source§impl Clone for PortMapping
impl Clone for PortMapping
Source§fn clone(&self) -> PortMapping
fn clone(&self) -> PortMapping
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PortMapping
impl RefUnwindSafe for PortMapping
impl Send for PortMapping
impl Sync for PortMapping
impl Unpin for PortMapping
impl UnsafeUnpin for PortMapping
impl UnwindSafe for PortMapping
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