pub type TryCastError<Src, Dst>where
Dst: TryFromBytes + ?Sized, = ConvertError<AlignmentError<Src, Dst>, SizeError<Src, Dst>, ValidityError<Src, Dst>>;
Expand description
The error type of fallible reference conversions.
Fallible reference conversions, like TryFromBytes::try_ref_from_bytes
may emit alignment, size, and
validity errors.
Aliased Type§
pub enum TryCastError<Src, Dst>where
Dst: TryFromBytes + ?Sized,{
Alignment(AlignmentError<Src, Dst>),
Size(SizeError<Src, Dst>),
Validity(ValidityError<Src, Dst>),
}
Variants§
Alignment(AlignmentError<Src, Dst>)
The conversion source was improperly aligned.
Size(SizeError<Src, Dst>)
The conversion source was of incorrect size.
Validity(ValidityError<Src, Dst>)
The conversion source contained invalid data.