You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: nat_pmp.rs
    path of file: ./repos/iroh/iroh-net/src/portmapper
    
    the code of the file until where you have to start completion: //! Definitions and utilities to interact with a NAT-PMP server.

use std::{net::Ipv4Addr, num::NonZeroU16, time::Duration};

use tracing::{debug, trace};

use crate::net::UdpSocket;

use self::protocol::{MapProtocol, Request, Response};

mod protocol;

/// Timeout to receive a response from a NAT-PMP server.
const RECV_TIMEOUT: Duration = Duration::from_millis(500);

/// Recommended lifetime is 2 hours. See [RFC 6886 Requesting a
/// Mapping](https://datatracker.ietf.org/doc/html/rfc6886#
    
pub async fn probe_available(local_ip: Ipv4Addr, gateway: Ipv4Addr) -> bool {
    match probe_available_fallible(local_ip, gateway).await {
        Ok(response) => {
            trace!("probe response: {response:?}");
            match response {
                Response::PublicAddress { .. } => true,
                _ => {
                    debug!("server returned an unexpected response type for probe");
                    // missbehaving server is not useful
                    false
                }
            }
        }
        Err(e) => {
            debug!("probe failed: {e}");
            false
        }
    }
}