pub enum DataEncodingTestFailure<T> where
    T: StrictEncode + StrictDecode + PartialEq + Debug + Clone
{ EncoderFailure(Error), DecoderFailure(ErrorVec<u8>), EncoderReturnedWrongLength { actual: usize, returned: usize, }, TranscodedObjectDiffersFromOriginal { original: T, transcoded: T, }, TranscodedVecDiffersFromOriginal { original: Vec<u8>, transcoded: Vec<u8>, object: T, }, }
👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

Expand description

Failures happening during strict encoding tests of struct and union encodings.

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

Variants

EncoderFailure(Error)

Tuple Fields

0: Error
👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

Encoder error

👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

Failure during encoding enum variant

DecoderFailure(ErrorVec<u8>)

Tuple Fields

0: Error
👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

Decoder error

1: Vec<u8>
👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

Byte string which failed to decode

👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

Failure during decoding binary representation of enum variant

EncoderReturnedWrongLength

Fields

actual: usize
👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

Actual length of the serialized data

returned: usize
👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

Incorrect length returned by the encoder

👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

Failure of the strict encode implementation: encoder reports incorrect length of the serialized data

TranscodedObjectDiffersFromOriginal

Fields

original: T
👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

Original value, which was encoded

transcoded: 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 object produced by decoding from the originally encoded object

TranscodedVecDiffersFromOriginal

Fields

original: Vec<u8>
👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

Original test vector, which was decoded

transcoded: Vec<u8>
👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

Byte string produced by encoding object, decoded from the test vector

object: T
👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

Object decoded from the test vector

👎 Deprecated since 1.6.1:

use strict_encoding_test crate instead

Test case failure representing mismatch between original test vector and serialization of the object decoded from that test vector

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.