Enum MbedtlsError

Source
#[non_exhaustive]
#[repr(i16)]
pub enum MbedtlsError {
Show 116 variants MpiFileIoError = -2, MpiBadInputData = -4, MpiInvalidCharacter = -6, MpiBufferTooSmall = -8, MpiNegativeValue = -10, MpiDivisionByZero = -12, MpiNotAcceptable = -14, MpiAllocFailed = -16, EcpBadInputData = -20_352, EcpBufferTooSmall = -20_224, EcpFeatureUnavailable = -20_096, EcpVerifyFailed = -19_968, EcpAllocFailed = -19_840, EcpRandomFailed = -19_712, EcpInvalidKey = -19_584, EcpSigLenMismatch = -19_456, EcpInProgress = -19_200, MdFeatureUnavailable = -20_608, MdBadInputData = -20_736, MdAllocFailed = -20_864, MdFileIoError = -20_992, PkAllocFailed = -16_256, PkTypeMismatch = -16_128, PkBadInputData = -16_000, PkFileIoError = -15_872, PkKeyInvalidVersion = -15_744, PkKeyInvalidFormat = -15_616, PkUnknownPkAlg = -15_488, PkPasswordRequired = -15_360, PkPasswordMismatch = -15_232, PkInvalidPubkey = -15_104, PkInvalidAlg = -14_976, PkUnknownNamedCurve = -14_848, PkFeatureUnavailable = -14_720, PkSigLenMismatch = -14_592, PkBufferTooSmall = -14_464, CipherFeatureUnavailable = -24_704, CipherBadInputData = -24_832, CipherAllocFailed = -24_960, CipherInvalidPadding = -25_088, CipherFullBlockExpected = -25_216, CipherAuthFailed = -25_344, CipherInvalidContext = -25_472, Sha1BadInputData = -115, Sha256BadInputData = -116, Sha512BadInputData = -117, Sha3BadInputData = -118, Poly1305BadInputData = -87, ChachapolyBadState = -84, ChachapolyAuthFailed = -86, Chacha20BadInputData = -81, SslCryptoInProgress = -28_672, SslFeatureUnavailable = -28_800, SslBadInputData = -28_928, SslInvalidMac = -29_056, SslInvalidRecord = -29_184, SslConnEof = -29_312, SslDecodeError = -29_440, SslNoRng = -29_696, SslNoClientCertificate = -29_824, SslUnsupportedExtension = -29_952, SslNoApplicationProtocol = -30_080, SslPrivateKeyRequired = -30_208, SslCaChainRequired = -30_336, SslUnexpectedMessage = -30_464, SslFatalAlertMessage = -30_592, SslUnrecognizedName = -30_720, SslPeerCloseNotify = -30_848, SslBadCertificate = -31_232, SslReceivedNewSessionTicket = -31_488, SslCannotReadEarlyData = -31_616, SslReceivedEarlyData = -31_744, SslCannotWriteEarlyData = -31_872, SslCacheEntryNotFound = -32_384, SslAllocFailed = -32_512, SslHwAccelFailed = -32_640, SslHwAccelFallthrough = -28_544, SslBadProtocolVersion = -28_288, SslHandshakeFailure = -28_160, SslSessionTicketExpired = -28_032, SslPkTypeMismatch = -27_904, SslUnknownIdentity = -27_776, SslInternalError = -27_648, SslCounterWrapping = -27_520, SslWaitingServerHelloRenego = -27_392, SslHelloVerifyRequired = -27_264, SslBufferTooSmall = -27_136, SslWantRead = -26_880, SslWantWrite = -26_752, SslTimeout = -26_624, SslClientReconnect = -26_496, SslUnexpectedRecord = -26_368, SslNonFatal = -26_240, SslIllegalParameter = -26_112, SslContinueProcessing = -25_984, SslAsyncInProgress = -25_856, SslEarlyMessage = -25_728, SslUnexpectedCid = -24_576, SslVersionMismatch = -24_320, SslBadConfig = -24_192, AesInvalidKeyLength = -32, AesInvalidInputLength = -34, AesBadInputData = -33, EntropySourceFailed = -60, EntropyMaxSources = -62, EntropyNoSourcesDefined = -64, EntropyNoStrongSource = -61, EntropyFileIoError = -63, CtrDrbgEntropySourceFailed = -52, CtrDrbgRequestTooBig = -54, CtrDrbgInputTooBig = -56, CtrDrbgFileIoError = -58, ErrorGenericError = -1, ErrorCorruptionDetected = -110, PlatformHwAccelFailed = -112, PlatformFeatureUnsupported = -114,
}
Expand description

Known mbedtls error codes

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

MpiFileIoError = -2

§

MpiBadInputData = -4

§

MpiInvalidCharacter = -6

§

MpiBufferTooSmall = -8

§

MpiNegativeValue = -10

§

MpiDivisionByZero = -12

§

MpiNotAcceptable = -14

§

MpiAllocFailed = -16

§

EcpBadInputData = -20_352

§

EcpBufferTooSmall = -20_224

§

EcpFeatureUnavailable = -20_096

§

EcpVerifyFailed = -19_968

§

EcpAllocFailed = -19_840

§

EcpRandomFailed = -19_712

§

EcpInvalidKey = -19_584

§

EcpSigLenMismatch = -19_456

§

EcpInProgress = -19_200

§

MdFeatureUnavailable = -20_608

§

MdBadInputData = -20_736

§

MdAllocFailed = -20_864

§

MdFileIoError = -20_992

§

PkAllocFailed = -16_256

§

PkTypeMismatch = -16_128

§

PkBadInputData = -16_000

§

PkFileIoError = -15_872

§

PkKeyInvalidVersion = -15_744

§

PkKeyInvalidFormat = -15_616

§

PkUnknownPkAlg = -15_488

§

PkPasswordRequired = -15_360

§

PkPasswordMismatch = -15_232

§

PkInvalidPubkey = -15_104

§

PkInvalidAlg = -14_976

§

PkUnknownNamedCurve = -14_848

§

PkFeatureUnavailable = -14_720

§

PkSigLenMismatch = -14_592

§

PkBufferTooSmall = -14_464

§

CipherFeatureUnavailable = -24_704

§

CipherBadInputData = -24_832

§

CipherAllocFailed = -24_960

§

CipherInvalidPadding = -25_088

§

CipherFullBlockExpected = -25_216

§

CipherAuthFailed = -25_344

§

CipherInvalidContext = -25_472

§

Sha1BadInputData = -115

§

Sha256BadInputData = -116

§

Sha512BadInputData = -117

§

Sha3BadInputData = -118

§

Poly1305BadInputData = -87

§

ChachapolyBadState = -84

§

ChachapolyAuthFailed = -86

§

Chacha20BadInputData = -81

§

SslCryptoInProgress = -28_672

§

SslFeatureUnavailable = -28_800

§

SslBadInputData = -28_928

§

SslInvalidMac = -29_056

§

SslInvalidRecord = -29_184

§

SslConnEof = -29_312

§

SslDecodeError = -29_440

§

SslNoRng = -29_696

§

SslNoClientCertificate = -29_824

§

SslUnsupportedExtension = -29_952

§

SslNoApplicationProtocol = -30_080

§

SslPrivateKeyRequired = -30_208

§

SslCaChainRequired = -30_336

§

SslUnexpectedMessage = -30_464

§

SslFatalAlertMessage = -30_592

§

SslUnrecognizedName = -30_720

§

SslPeerCloseNotify = -30_848

§

SslBadCertificate = -31_232

§

SslReceivedNewSessionTicket = -31_488

§

SslCannotReadEarlyData = -31_616

§

SslReceivedEarlyData = -31_744

§

SslCannotWriteEarlyData = -31_872

§

SslCacheEntryNotFound = -32_384

§

SslAllocFailed = -32_512

§

SslHwAccelFailed = -32_640

§

SslHwAccelFallthrough = -28_544

§

SslBadProtocolVersion = -28_288

§

SslHandshakeFailure = -28_160

§

SslSessionTicketExpired = -28_032

§

SslPkTypeMismatch = -27_904

§

SslUnknownIdentity = -27_776

§

SslInternalError = -27_648

§

SslCounterWrapping = -27_520

§

SslWaitingServerHelloRenego = -27_392

§

SslHelloVerifyRequired = -27_264

§

SslBufferTooSmall = -27_136

§

SslWantRead = -26_880

§

SslWantWrite = -26_752

§

SslTimeout = -26_624

§

SslClientReconnect = -26_496

§

SslUnexpectedRecord = -26_368

§

SslNonFatal = -26_240

§

SslIllegalParameter = -26_112

§

SslContinueProcessing = -25_984

§

SslAsyncInProgress = -25_856

§

SslEarlyMessage = -25_728

§

SslUnexpectedCid = -24_576

§

SslVersionMismatch = -24_320

§

SslBadConfig = -24_192

§

AesInvalidKeyLength = -32

§

AesInvalidInputLength = -34

§

AesBadInputData = -33

§

EntropySourceFailed = -60

§

EntropyMaxSources = -62

§

EntropyNoSourcesDefined = -64

§

EntropyNoStrongSource = -61

§

EntropyFileIoError = -63

§

CtrDrbgEntropySourceFailed = -52

§

CtrDrbgRequestTooBig = -54

§

CtrDrbgInputTooBig = -56

§

CtrDrbgFileIoError = -58

§

ErrorGenericError = -1

§

ErrorCorruptionDetected = -110

§

PlatformHwAccelFailed = -112

§

PlatformFeatureUnsupported = -114

Trait Implementations§

Source§

impl Clone for MbedtlsError

Source§

fn clone(&self) -> MbedtlsError

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for MbedtlsError

Source§

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

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

impl PartialEq for MbedtlsError

Source§

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

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

const 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 TryFrom<i16> for MbedtlsError

Source§

type Error = TryFromPrimitiveError<MbedtlsError>

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

fn try_from(number: i16) -> Result<Self, TryFromPrimitiveError<Self>>

Performs the conversion.
Source§

impl TryFromPrimitive for MbedtlsError

Source§

impl Copy for MbedtlsError

Source§

impl Eq for MbedtlsError

Source§

impl StructuralPartialEq for MbedtlsError

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, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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, 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.