pub trait SessionPortMapper: Send + Sync {
// Required methods
fn map(
&self,
internal_port: u16,
description: &str,
) -> Result<MappedSessionPort, MapRefusal>;
fn unmap(&self, id: u64);
}Expand description
Carrier-owned UDP session port mapper (UPnP, relay map, etc.).
Required Methods§
Sourcefn map(
&self,
internal_port: u16,
description: &str,
) -> Result<MappedSessionPort, MapRefusal>
fn map( &self, internal_port: u16, description: &str, ) -> Result<MappedSessionPort, MapRefusal>
Blocking, bounded by the provider (typically five seconds). Owns renewal.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".