[][src]Enum natpmp::Error

pub enum Error {
    NATPMP_ERR_INVALIDARGS,
    NATPMP_ERR_SOCKETERROR,
    NATPMP_ERR_CANNOTGETGATEWAY,
    NATPMP_ERR_CLOSEERR,
    NATPMP_ERR_RECVFROM,
    NATPMP_ERR_NOPENDINGREQ,
    NATPMP_ERR_NOGATEWAYSUPPORT,
    NATPMP_ERR_CONNECTERR,
    NATPMP_ERR_WRONGPACKETSOURCE,
    NATPMP_ERR_SENDERR,
    NATPMP_ERR_FCNTLERROR,
    NATPMP_ERR_GETTIMEOFDAYERR,
    NATPMP_ERR_UNSUPPORTEDVERSION,
    NATPMP_ERR_UNSUPPORTEDOPCODE,
    NATPMP_ERR_UNDEFINEDERROR,
    NATPMP_ERR_NOTAUTHORIZED,
    NATPMP_ERR_NETWORKFAILURE,
    NATPMP_ERR_OUTOFRESOURCES,
    NATPMP_TRYAGAIN,
}

NAT-PMP error.

Note

These errors are for compatibility only:

Examples

use natpmp::*;

let err = Error::NATPMP_ERR_CANNOTGETGATEWAY;
println!("{}", err);

Variants

NATPMP_ERR_INVALIDARGS

Invalid arguments

NATPMP_ERR_SOCKETERROR

Failed to create a socket

NATPMP_ERR_CANNOTGETGATEWAY

Can not get default gateway address

NATPMP_ERR_CLOSEERR

Failed to close socket

NATPMP_ERR_RECVFROM

Failed to recvfrom socket

NATPMP_ERR_NOPENDINGREQ

No pending request

NATPMP_ERR_NOGATEWAYSUPPORT

Gateway does not support NAT-PMP

NATPMP_ERR_CONNECTERR

Failed to connect to the gateway

NATPMP_ERR_WRONGPACKETSOURCE

Packet not received from the gateway

NATPMP_ERR_SENDERR

Failed to send

NATPMP_ERR_FCNTLERROR

Failed to set nonblocking

NATPMP_ERR_GETTIMEOFDAYERR

Failed to get time

NATPMP_ERR_UNSUPPORTEDVERSION

Unsupported NAT-PMP version

NATPMP_ERR_UNSUPPORTEDOPCODE

Unsupported NAT-PMP opcode

NATPMP_ERR_UNDEFINEDERROR

Unknown NAT-PMP error

NATPMP_ERR_NOTAUTHORIZED

Not authorized

NATPMP_ERR_NETWORKFAILURE

Network failure

NATPMP_ERR_OUTOFRESOURCES

NAT-PMP out of resources

NATPMP_TRYAGAIN

Try again

Trait Implementations

impl Eq for Error
[src]

impl Copy for Error
[src]

impl PartialEq<Error> for Error
[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl Clone for Error
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Error
[src]

impl Display for Error
[src]

Auto Trait Implementations

impl Send for Error

impl Sync for Error

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]