Enum strict_encoding::test_helpers::EnumEncodingTestFailure[][src]

pub enum EnumEncodingTestFailure<T> where
    T: Clone + PartialEq + Debug
{ EncoderFailure(T, Error), DecoderFailure(T, Error, Vec<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(u8, Error), 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
👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

Failure during encoding enum variant

Tuple Fields of EncoderFailure

0: T
👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

1: Error
👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

DecoderFailure
👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

Failure during decoding binary representation of enum variant

Tuple Fields of DecoderFailure

0: T
👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

1: Error
👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

2: Vec<u8>
👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

DecodedDiffersFromOriginal
👎 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

Fields of DecodedDiffersFromOriginal

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

ValueMismatch
👎 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

Fields of ValueMismatch

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

EncodedValueMismatch
👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

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

Fields of EncodedValueMismatch

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

DecoderWrongErrorOnUnknownValue
👎 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

Tuple Fields of DecoderWrongErrorOnUnknownValue

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

UnknownDecodesToVariant
👎 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

Tuple Fields of UnknownDecodesToVariant

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

FailedEq
👎 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

Tuple Fields of FailedEq

0: T
👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

Enum variant which is not equal to itself

FailedNe
👎 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

Tuple Fields of FailedNe

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

FailedOrd
👎 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

Tuple Fields of FailedOrd

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

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

Performs the conversion.

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

Performs the conversion.

Performs the conversion.

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)

recently added

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.