pub fn as_u16(&self) -> u16 {
        use self::ApiError::*;
        match *self {
            Generic(_) => 0,
            MissingParameter => 10,
            ClientMustUpgrade => 20,
            ServerMustUpgrade => 30,
            WrongAuth => 40,
            Ldap => 41,
            NotAuthorized(_) => 50,
            TrialExpired => 60,
            NotFound => 70,
        }
    }
/// Returns the code number of the error.
Returns the code number of the error.
Returns the code number of the error .
pub fn as_u16(&self) -> u16 {
        use self::ApiError::*;
        match *self {
            Generic(_) => 0,
            MissingParameter => 10,
            ClientMustUpgrade => 20,
            ServerMustUpgrade => 30,
            WrongAuth => 40,
            Ldap => 41,
            NotAuthorized(_) => 50,
            TrialExpired => 60,
            NotFound => 70,
        }
    }
pub fn as_u16 ( & self ) -> u16 { use self :: ApiError :: * ; match * self { Generic ( _ ) => 0 , MissingParameter => 10 , ClientMustUpgrade => 20 , ServerMustUpgrade => 30 , WrongAuth => 40 , Ldap => 41 , NotAuthorized ( _ ) => 50 , TrialExpired => 60 , NotFound => 70 , } }
Returns the code number of the error.
Returns the code number of the error .
&self
&self