pub enum EnumEncodingTestFailure<T> where
    T: Clone + PartialEq + Debug
{ EncoderFailure(T, Error), DecoderFailure(T, ErrorVec<u8>), DecodedDiffersFromOriginal { original: T, decoded: T, }, ValueMismatch { enum_name: &'static str, variant_name: &'static str, expected: usize, actual: usize, }, EncodedValueMismatch { enum_name: &'static str, variant_name: &'static str, expected: Vec<u8>, actual: Vec<u8>, }, DecoderWrongErrorOnUnknownValue(u8Error), UnknownDecodesToVariant(u8, T), FailedEq(T), FailedNe(T, T), FailedOrd(T, T), }
👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

Expand description

Failures happening during strict encoding tests of enum encodings.

NB: These errors are specific for testing configuration and should not be used in non-test environment.

Variants

EncoderFailure(T, Error)

👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

Failure during encoding enum variant

DecoderFailure(T, ErrorVec<u8>)

👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

Failure during decoding binary representation of enum variant

DecodedDiffersFromOriginal

Fields

original: T
👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

Original value, which was encoded

decoded: T
👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

The value resulting from decoding encoded original value

👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

Test case failure representing mismatch between enum variant produced by decoding from the originally encoded enum variant

ValueMismatch

Fields

enum_name: &'static str
👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

Name of the enum being tested

variant_name: &'static str
👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

Name of the enum variant being tested

expected: usize
👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

Expected primitive value for the tested enum variant

actual: usize
👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

Actual primitive value of the tested enum variant

👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

Test case failure representing mismatch between expected enum variant primitive value and the actual primitive value assigned to the enum variant by the rust compiler

EncodedValueMismatch

Fields

enum_name: &'static str
👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

Name of the enum being tested

variant_name: &'static str
👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

Name of the enum variant being tested

expected: Vec<u8>
👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

Expected encoded byte string for the tested enum variant

actual: Vec<u8>
👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

Actual encoded byte string of the tested enum variant

👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

Test case failure representing failed byte string representation of the encoded enum variant

DecoderWrongErrorOnUnknownValue(u8Error)

Tuple Fields

0: u8
👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

Value which was decoded into an enum variant

1: Error
👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

Error which was produced during decoding that value

👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

Test case failure representing incorrect decoder error during processing out-of-enum range value

UnknownDecodesToVariant(u8, T)

Tuple Fields

0: u8
👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

Value which was decoded into an enum variant

1: T
👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

Enum variant resulting from decoding wrong value

👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

Test case failure representing a out-of-enum range primitive value still being interpreted as one of enum variants

FailedEq(T)

Tuple Fields

0: T
👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

Enum variant which is not equal to itself

👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

Test case failure due to wrong PartialEq or Eq implementation: enum variant is not equal to itself

FailedNe(T, T)

Tuple Fields

0: T
👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

First of two enum variants which are treated as equal

1: T
👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

Second of two enum variants which are treated as equal

👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

Test case failure due to wrong PartialEq or Eq implementation: two distinct enum variants are still equal

FailedOrd(T, T)

Tuple Fields

0: T
👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

First of two enum variants which are disordered. This variant should smaller than the second one, but Ord operation treats it as a larger one

1: T
👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

Second of two enum variants which are disordered. This variant should larger than the second one, but Ord operation treats it as a smaller one

👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

Test case failure due to wrong PartialOrd or Ord implementation happening when enum variants ordering is broken

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

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

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Converts to this type from the input type.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

Should always be Self

The resulting type after obtaining ownership.

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

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

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

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.