Enum rustls_ffi::rustls_result
source · [−]#[repr(u32)]
pub enum rustls_result {
Show 73 variants
Ok,
Io,
NullParameter,
InvalidDnsNameError,
Panic,
CertificateParseError,
PrivateKeyParseError,
InsufficientSize,
NotFound,
InvalidParameter,
UnexpectedEof,
PlaintextEmpty,
CorruptMessage,
NoCertificatesPresented,
DecryptError,
FailedToGetCurrentTime,
FailedToGetRandomBytes,
HandshakeNotComplete,
PeerSentOversizedRecord,
NoApplicationProtocol,
BadMaxFragmentSize,
UnsupportedNameType,
EncryptError,
CertInvalidEncoding,
CertInvalidSignatureType,
CertInvalidSignature,
CertInvalidData,
PeerIncompatibleError,
PeerMisbehavedError,
InappropriateMessage,
InappropriateHandshakeMessage,
CorruptMessagePayload,
General,
AlertCloseNotify,
AlertUnexpectedMessage,
AlertBadRecordMac,
AlertDecryptionFailed,
AlertRecordOverflow,
AlertDecompressionFailure,
AlertHandshakeFailure,
AlertNoCertificate,
AlertBadCertificate,
AlertUnsupportedCertificate,
AlertCertificateRevoked,
AlertCertificateExpired,
AlertCertificateUnknown,
AlertIllegalParameter,
AlertUnknownCA,
AlertAccessDenied,
AlertDecodeError,
AlertDecryptError,
AlertExportRestriction,
AlertProtocolVersion,
AlertInsufficientSecurity,
AlertInternalError,
AlertInappropriateFallback,
AlertUserCanceled,
AlertNoRenegotiation,
AlertMissingExtension,
AlertUnsupportedExtension,
AlertCertificateUnobtainable,
AlertUnrecognisedName,
AlertBadCertificateStatusResponse,
AlertBadCertificateHashValue,
AlertUnknownPSKIdentity,
AlertCertificateRequired,
AlertNoApplicationProtocol,
AlertUnknown,
CertSCTMalformed,
CertSCTInvalidSignature,
CertSCTTimestampInFuture,
CertSCTUnsupportedVersion,
CertSCTUnknownLog,
}Variants
Ok
Io
NullParameter
InvalidDnsNameError
Panic
CertificateParseError
PrivateKeyParseError
InsufficientSize
NotFound
InvalidParameter
UnexpectedEof
PlaintextEmpty
CorruptMessage
NoCertificatesPresented
DecryptError
FailedToGetCurrentTime
FailedToGetRandomBytes
HandshakeNotComplete
PeerSentOversizedRecord
NoApplicationProtocol
BadMaxFragmentSize
UnsupportedNameType
EncryptError
CertInvalidEncoding
CertInvalidSignatureType
CertInvalidSignature
CertInvalidData
PeerIncompatibleError
PeerMisbehavedError
InappropriateMessage
InappropriateHandshakeMessage
CorruptMessagePayload
General
AlertCloseNotify
AlertUnexpectedMessage
AlertBadRecordMac
AlertDecryptionFailed
AlertRecordOverflow
AlertDecompressionFailure
AlertHandshakeFailure
AlertNoCertificate
AlertBadCertificate
AlertUnsupportedCertificate
AlertCertificateRevoked
AlertCertificateExpired
AlertCertificateUnknown
AlertIllegalParameter
AlertUnknownCA
AlertAccessDenied
AlertDecodeError
AlertDecryptError
AlertExportRestriction
AlertProtocolVersion
AlertInsufficientSecurity
AlertInternalError
AlertInappropriateFallback
AlertUserCanceled
AlertNoRenegotiation
AlertMissingExtension
AlertUnsupportedExtension
AlertCertificateUnobtainable
AlertUnrecognisedName
AlertBadCertificateStatusResponse
AlertBadCertificateHashValue
AlertUnknownPSKIdentity
AlertCertificateRequired
AlertNoApplicationProtocol
AlertUnknown
CertSCTMalformed
CertSCTInvalidSignature
CertSCTTimestampInFuture
CertSCTUnsupportedVersion
CertSCTUnknownLog
Implementations
sourceimpl rustls_result
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
)
#[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.
#[no_mangle]pub extern "C" fn rustls_result_is_cert_error(result: c_uint) -> bool
Trait Implementations
sourceimpl Debug for rustls_result
impl Debug for rustls_result
sourceimpl Display for rustls_result
impl Display for rustls_result
sourceimpl TryFrom<u32> for rustls_result
impl TryFrom<u32> for rustls_result
type Error = TryFromPrimitiveError<rustls_result>
type Error = TryFromPrimitiveError<rustls_result>
The type returned in the event of a conversion error.
sourcefn try_from(number: u32) -> Result<Self, TryFromPrimitiveError<Self>>
fn try_from(number: u32) -> Result<Self, TryFromPrimitiveError<Self>>
Performs the conversion.
sourceimpl TryFromPrimitive for rustls_result
impl TryFromPrimitive for rustls_result
type Primitive = u32
const NAME: &'static str = "rustls_result"
fn try_from_primitive(
number: Self::Primitive
) -> Result<Self, TryFromPrimitiveError<Self>>
Auto Trait Implementations
impl RefUnwindSafe for rustls_result
impl Send for rustls_result
impl Sync for rustls_result
impl Unpin for rustls_result
impl UnwindSafe for rustls_result
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more