pub trait HostPorts: Send + Sync {
// Required methods
fn in_use(&self, port: u16, protocol: Protocol) -> bool;
fn pick_free(&self, protocol: Protocol) -> Option<HeldPort>;
fn reachable<'a>(
&'a self,
host: &'a str,
port: u16,
within: Duration,
) -> BoxFuture<'a, bool>;
}Expand description
The host’s ports.
Required Methods§
Sourcefn in_use(&self, port: u16, protocol: Protocol) -> bool
fn in_use(&self, port: u16, protocol: Protocol) -> bool
Whether port is taken over protocol on the loopback.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".