Enum igd::AddAnyPortError
source · [−]pub enum AddAnyPortError {
ActionNotAuthorized,
InternalPortZeroInvalid,
NoPortsAvailable,
ExternalPortInUse,
OnlyPermanentLeasesSupported,
DescriptionTooLong,
RequestError(RequestError),
}
Expand description
Errors returned by Gateway::add_any_port
and Gateway::get_any_address
Variants
ActionNotAuthorized
The client is not authorized to perform the operation.
InternalPortZeroInvalid
Can not add a mapping for local port 0.
NoPortsAvailable
The gateway does not have any free ports.
ExternalPortInUse
The gateway can only map internal ports to same-numbered external ports and this external port is in use.
OnlyPermanentLeasesSupported
The gateway only supports permanent leases (ie. a lease_duration
of 0).
DescriptionTooLong
The description was too long for the gateway to handle.
RequestError(RequestError)
Some other error occured performing the request.
Trait Implementations
sourceimpl Debug for AddAnyPortError
impl Debug for AddAnyPortError
sourceimpl Display for AddAnyPortError
impl Display for AddAnyPortError
sourceimpl Error for AddAnyPortError
impl Error for AddAnyPortError
sourcefn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
👎 Deprecated since 1.33.0:
replaced by Error::source, which can support downcasting
sourcefn description(&self) -> &str
fn description(&self) -> &str
👎 Deprecated since 1.42.0:
use the Display impl or to_string()
sourceimpl From<RequestError> for AddAnyPortError
impl From<RequestError> for AddAnyPortError
sourcefn from(err: RequestError) -> AddAnyPortError
fn from(err: RequestError) -> AddAnyPortError
Performs the conversion.
Auto Trait Implementations
impl !RefUnwindSafe for AddAnyPortError
impl Send for AddAnyPortError
impl Sync for AddAnyPortError
impl Unpin for AddAnyPortError
impl !UnwindSafe for AddAnyPortError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more