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§
source§impl Debug for AddAnyPortError
impl Debug for AddAnyPortError
source§impl Display for AddAnyPortError
impl Display for AddAnyPortError
source§impl Error for AddAnyPortError
impl Error for AddAnyPortError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<AddAnyPortError> for Error
impl From<AddAnyPortError> for Error
source§fn from(err: AddAnyPortError) -> Error
fn from(err: AddAnyPortError) -> Error
Converts to this type from the input type.
source§impl From<GetExternalIpError> for AddAnyPortError
impl From<GetExternalIpError> for AddAnyPortError
source§fn from(err: GetExternalIpError) -> AddAnyPortError
fn from(err: GetExternalIpError) -> AddAnyPortError
Converts to this type from the input type.
source§impl From<RequestError> for AddAnyPortError
impl From<RequestError> for AddAnyPortError
source§fn from(err: RequestError) -> AddAnyPortError
fn from(err: RequestError) -> AddAnyPortError
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for AddAnyPortError
impl !RefUnwindSafe for AddAnyPortError
impl Send for AddAnyPortError
impl Sync for AddAnyPortError
impl Unpin for AddAnyPortError
impl !UnwindSafe for AddAnyPortError
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more