#![deny(missing_docs)]
pub use self::{
common::{parsing::PortMappingEntry, SearchOptions},
errors::{
AddAnyPortError, AddPortError, Error, GetExternalIpError, GetGenericPortMappingEntryError,
RemovePortError, RequestError, Result, SearchError,
},
gateway::Gateway,
search::search_gateway,
};
#[cfg(feature = "aio")]
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",
}
)
}
}