Enum rustls_ffi::rustls_result

source ·
#[repr(u32)]
pub enum rustls_result {
Show 113 variants Ok = 7_000, Io = 7_001, NullParameter = 7_002, InvalidDnsNameError = 7_003, Panic = 7_004, CertificateParseError = 7_005, PrivateKeyParseError = 7_006, InsufficientSize = 7_007, NotFound = 7_008, InvalidParameter = 7_009, UnexpectedEof = 7_010, PlaintextEmpty = 7_011, AcceptorNotReady = 7_012, AlreadyUsed = 7_013, CertificateRevocationListParseError = 7_014, NoServerCertVerifier = 7_015, NoDefaultCryptoProvider = 7_016, GetRandomFailed = 7_017, NoCertificatesPresented = 7_101, DecryptError = 7_102, FailedToGetCurrentTime = 7_103, FailedToGetRandomBytes = 7_113, HandshakeNotComplete = 7_104, PeerSentOversizedRecord = 7_105, NoApplicationProtocol = 7_106, BadMaxFragmentSize = 7_114, UnsupportedNameType = 7_115, EncryptError = 7_116, CertEncodingBad = 7_121, CertExpired = 7_122, CertNotYetValid = 7_123, CertRevoked = 7_124, CertUnhandledCriticalExtension = 7_125, CertUnknownIssuer = 7_126, CertBadSignature = 7_127, CertNotValidForName = 7_128, CertInvalidPurpose = 7_129, CertApplicationVerificationFailure = 7_130, CertOtherError = 7_131, CertUnknownRevocationStatus = 7_154, MessageHandshakePayloadTooLarge = 7_133, MessageInvalidCcs = 7_134, MessageInvalidContentType = 7_135, MessageInvalidCertStatusType = 7_136, MessageInvalidCertRequest = 7_137, MessageInvalidDhParams = 7_138, MessageInvalidEmptyPayload = 7_139, MessageInvalidKeyUpdate = 7_140, MessageInvalidServerName = 7_141, MessageTooLarge = 7_142, MessageTooShort = 7_143, MessageMissingData = 7_144, MessageMissingKeyExchange = 7_145, MessageNoSignatureSchemes = 7_146, MessageTrailingData = 7_147, MessageUnexpectedMessage = 7_148, MessageUnknownProtocolVersion = 7_149, MessageUnsupportedCompression = 7_150, MessageUnsupportedCurveType = 7_151, MessageUnsupportedKeyExchangeAlgorithm = 7_152, MessageInvalidOther = 7_153, PeerIncompatibleError = 7_107, PeerMisbehavedError = 7_108, InappropriateMessage = 7_109, InappropriateHandshakeMessage = 7_110, General = 7_112, AlertCloseNotify = 7_200, AlertUnexpectedMessage = 7_201, AlertBadRecordMac = 7_202, AlertDecryptionFailed = 7_203, AlertRecordOverflow = 7_204, AlertDecompressionFailure = 7_205, AlertHandshakeFailure = 7_206, AlertNoCertificate = 7_207, AlertBadCertificate = 7_208, AlertUnsupportedCertificate = 7_209, AlertCertificateRevoked = 7_210, AlertCertificateExpired = 7_211, AlertCertificateUnknown = 7_212, AlertIllegalParameter = 7_213, AlertUnknownCA = 7_214, AlertAccessDenied = 7_215, AlertDecodeError = 7_216, AlertDecryptError = 7_217, AlertExportRestriction = 7_218, AlertProtocolVersion = 7_219, AlertInsufficientSecurity = 7_220, AlertInternalError = 7_221, AlertInappropriateFallback = 7_222, AlertUserCanceled = 7_223, AlertNoRenegotiation = 7_224, AlertMissingExtension = 7_225, AlertUnsupportedExtension = 7_226, AlertCertificateUnobtainable = 7_227, AlertUnrecognisedName = 7_228, AlertBadCertificateStatusResponse = 7_229, AlertBadCertificateHashValue = 7_230, AlertUnknownPSKIdentity = 7_231, AlertCertificateRequired = 7_232, AlertNoApplicationProtocol = 7_233, AlertUnknown = 7_234, CertRevocationListBadSignature = 7_400, CertRevocationListInvalidCrlNumber = 7_401, CertRevocationListInvalidRevokedCertSerialNumber = 7_402, CertRevocationListIssuerInvalidForCrl = 7_403, CertRevocationListOtherError = 7_404, CertRevocationListParseError = 7_405, CertRevocationListUnsupportedCrlVersion = 7_406, CertRevocationListUnsupportedCriticalExtension = 7_407, CertRevocationListUnsupportedDeltaCrl = 7_408, CertRevocationListUnsupportedIndirectCrl = 7_409, CertRevocationListUnsupportedRevocationReason = 7_410, ClientCertVerifierBuilderNoRootAnchors = 7_500,
}

Variants§

§

Ok = 7_000

§

Io = 7_001

§

NullParameter = 7_002

§

InvalidDnsNameError = 7_003

§

Panic = 7_004

§

CertificateParseError = 7_005

§

PrivateKeyParseError = 7_006

§

InsufficientSize = 7_007

§

NotFound = 7_008

§

InvalidParameter = 7_009

§

UnexpectedEof = 7_010

§

PlaintextEmpty = 7_011

§

AcceptorNotReady = 7_012

§

AlreadyUsed = 7_013

§

CertificateRevocationListParseError = 7_014

§

NoServerCertVerifier = 7_015

§

NoDefaultCryptoProvider = 7_016

§

GetRandomFailed = 7_017

§

NoCertificatesPresented = 7_101

§

DecryptError = 7_102

§

FailedToGetCurrentTime = 7_103

§

FailedToGetRandomBytes = 7_113

§

HandshakeNotComplete = 7_104

§

PeerSentOversizedRecord = 7_105

§

NoApplicationProtocol = 7_106

§

BadMaxFragmentSize = 7_114

§

UnsupportedNameType = 7_115

§

EncryptError = 7_116

§

CertEncodingBad = 7_121

§

CertExpired = 7_122

§

CertNotYetValid = 7_123

§

CertRevoked = 7_124

§

CertUnhandledCriticalExtension = 7_125

§

CertUnknownIssuer = 7_126

§

CertBadSignature = 7_127

§

CertNotValidForName = 7_128

§

CertInvalidPurpose = 7_129

§

CertApplicationVerificationFailure = 7_130

§

CertOtherError = 7_131

§

CertUnknownRevocationStatus = 7_154

§

MessageHandshakePayloadTooLarge = 7_133

§

MessageInvalidCcs = 7_134

§

MessageInvalidContentType = 7_135

§

MessageInvalidCertStatusType = 7_136

§

MessageInvalidCertRequest = 7_137

§

MessageInvalidDhParams = 7_138

§

MessageInvalidEmptyPayload = 7_139

§

MessageInvalidKeyUpdate = 7_140

§

MessageInvalidServerName = 7_141

§

MessageTooLarge = 7_142

§

MessageTooShort = 7_143

§

MessageMissingData = 7_144

§

MessageMissingKeyExchange = 7_145

§

MessageNoSignatureSchemes = 7_146

§

MessageTrailingData = 7_147

§

MessageUnexpectedMessage = 7_148

§

MessageUnknownProtocolVersion = 7_149

§

MessageUnsupportedCompression = 7_150

§

MessageUnsupportedCurveType = 7_151

§

MessageUnsupportedKeyExchangeAlgorithm = 7_152

§

MessageInvalidOther = 7_153

§

PeerIncompatibleError = 7_107

§

PeerMisbehavedError = 7_108

§

InappropriateMessage = 7_109

§

InappropriateHandshakeMessage = 7_110

§

General = 7_112

§

AlertCloseNotify = 7_200

§

AlertUnexpectedMessage = 7_201

§

AlertBadRecordMac = 7_202

§

AlertDecryptionFailed = 7_203

§

AlertRecordOverflow = 7_204

§

AlertDecompressionFailure = 7_205

§

AlertHandshakeFailure = 7_206

§

AlertNoCertificate = 7_207

§

AlertBadCertificate = 7_208

§

AlertUnsupportedCertificate = 7_209

§

AlertCertificateRevoked = 7_210

§

AlertCertificateExpired = 7_211

§

AlertCertificateUnknown = 7_212

§

AlertIllegalParameter = 7_213

§

AlertUnknownCA = 7_214

§

AlertAccessDenied = 7_215

§

AlertDecodeError = 7_216

§

AlertDecryptError = 7_217

§

AlertExportRestriction = 7_218

§

AlertProtocolVersion = 7_219

§

AlertInsufficientSecurity = 7_220

§

AlertInternalError = 7_221

§

AlertInappropriateFallback = 7_222

§

AlertUserCanceled = 7_223

§

AlertNoRenegotiation = 7_224

§

AlertMissingExtension = 7_225

§

AlertUnsupportedExtension = 7_226

§

AlertCertificateUnobtainable = 7_227

§

AlertUnrecognisedName = 7_228

§

AlertBadCertificateStatusResponse = 7_229

§

AlertBadCertificateHashValue = 7_230

§

AlertUnknownPSKIdentity = 7_231

§

AlertCertificateRequired = 7_232

§

AlertNoApplicationProtocol = 7_233

§

AlertUnknown = 7_234

§

CertRevocationListBadSignature = 7_400

§

CertRevocationListInvalidCrlNumber = 7_401

§

CertRevocationListInvalidRevokedCertSerialNumber = 7_402

§

CertRevocationListIssuerInvalidForCrl = 7_403

§

CertRevocationListOtherError = 7_404

§

CertRevocationListParseError = 7_405

§

CertRevocationListUnsupportedCrlVersion = 7_406

§

CertRevocationListUnsupportedCriticalExtension = 7_407

§

CertRevocationListUnsupportedDeltaCrl = 7_408

§

CertRevocationListUnsupportedIndirectCrl = 7_409

§

CertRevocationListUnsupportedRevocationReason = 7_410

§

ClientCertVerifierBuilderNoRootAnchors = 7_500

Implementations§

source§

impl rustls_result

source

#[no_mangle]
pub extern "C" fn rustls_error( result: c_uint, buf: *mut c_char, len: size_t, out_n: *mut size_t, )

After a rustls function returns an error, you may call this to get a pointer to a buffer containing a detailed error message.

The contents of the error buffer will be out_n bytes long, UTF-8 encoded, and not NUL-terminated.

source

#[no_mangle]
pub extern "C" fn rustls_result_is_cert_error(result: c_uint) -> bool

Trait Implementations§

source§

impl Clone for rustls_result

source§

fn clone(&self) -> rustls_result

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for rustls_result

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for rustls_result

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<u32> for rustls_result

source§

fn from(x: u32) -> Self

Converts to this type from the input type.
source§

impl PartialEq for rustls_result

source§

fn eq(&self, other: &rustls_result) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for rustls_result

source§

impl Eq for rustls_result

source§

impl StructuralPartialEq for rustls_result

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.