#![deny(missing_docs)]
pub use self::common::parsing::PortMappingEntry;
pub use self::common::SearchOptions;
pub use self::errors::{
AddAnyPortError, AddPortError, GetExternalIpError, GetGenericPortMappingEntryError, RemovePortError, RequestError,
SearchError,
};
pub use self::errors::{Error, Result};
pub use self::gateway::Gateway;
pub use self::search::search_gateway;
#[cfg(any(feature = "aio_tokio", feature = "aio_async_std"))]
pub mod aio;
mod common;
mod errors;
mod gateway;
mod search;
use std::fmt;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum PortMappingProtocol {
TCP,
UDP,
}
impl fmt::Display for PortMappingProtocol {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(
f,
"{}",
match *self {
PortMappingProtocol::TCP => "TCP",
PortMappingProtocol::UDP => "UDP",
}
)
}
}