Enum strict_encoding::test_helpers::DataEncodingTestFailure [−][src]
pub enum DataEncodingTestFailure<T> where
T: StrictEncode + StrictDecode + PartialEq + Debug + Clone, {
EncoderFailure(Error),
DecoderFailure(Error, Vec<u8>),
EncoderReturnedWrongLength {
actual: usize,
returned: usize,
},
TranscodedObjectDiffersFromOriginal {
original: T,
transcoded: T,
},
TranscodedVecDiffersFromOriginal {
original: Vec<u8>,
transcoded: Vec<u8>,
object: T,
},
}
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
Failure during encoding enum variant
Tuple Fields of EncoderFailure
0: Error
Encoder error
Failure during decoding binary representation of enum variant
Failure of the strict encode implementation: encoder reports incorrect length of the serialized data
Fields of EncoderReturnedWrongLength
Test case failure representing mismatch between object produced by decoding from the originally encoded object
Fields of TranscodedObjectDiffersFromOriginal
Test case failure representing mismatch between original test vector and serialization of the object decoded from that test vector
Fields of TranscodedVecDiffersFromOriginal
Trait Implementations
impl<T: Clone> Clone for DataEncodingTestFailure<T> where
T: StrictEncode + StrictDecode + PartialEq + Debug + Clone,
impl<T: Clone> Clone for DataEncodingTestFailure<T> where
T: StrictEncode + StrictDecode + PartialEq + Debug + Clone,
impl<T: Debug> Debug for DataEncodingTestFailure<T> where
T: StrictEncode + StrictDecode + PartialEq + Debug + Clone,
impl<T: Debug> Debug for DataEncodingTestFailure<T> where
T: StrictEncode + StrictDecode + PartialEq + Debug + Clone,
impl<T> Display for DataEncodingTestFailure<T> where
T: StrictEncode + StrictDecode + PartialEq + Debug + Clone,
impl<T> Display for DataEncodingTestFailure<T> where
T: StrictEncode + StrictDecode + PartialEq + Debug + Clone,
impl<T> Error for DataEncodingTestFailure<T> where
T: StrictEncode + StrictDecode + PartialEq + Debug + Clone,
impl<T> Error for DataEncodingTestFailure<T> where
T: StrictEncode + StrictDecode + PartialEq + Debug + Clone,
impl<T> From<DataEncodingTestFailure<T>> for String where
T: StrictEncode + StrictDecode + PartialEq + Debug + Clone,
impl<T> From<DataEncodingTestFailure<T>> for String where
T: StrictEncode + StrictDecode + PartialEq + Debug + Clone,
Performs the conversion.
impl<T: PartialEq> PartialEq<DataEncodingTestFailure<T>> for DataEncodingTestFailure<T> where
T: StrictEncode + StrictDecode + PartialEq + Debug + Clone,
impl<T: PartialEq> PartialEq<DataEncodingTestFailure<T>> for DataEncodingTestFailure<T> where
T: StrictEncode + StrictDecode + PartialEq + Debug + Clone,
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
impl<T> StructuralPartialEq for DataEncodingTestFailure<T> where
T: StrictEncode + StrictDecode + PartialEq + Debug + Clone,
Auto Trait Implementations
impl<T> RefUnwindSafe for DataEncodingTestFailure<T> where
T: RefUnwindSafe,
impl<T> Send for DataEncodingTestFailure<T> where
T: Send,
impl<T> Sync for DataEncodingTestFailure<T> where
T: Sync,
impl<T> Unpin for DataEncodingTestFailure<T> where
T: Unpin,
impl<T> UnwindSafe for DataEncodingTestFailure<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more