pub enum Error {
Invalid,
Unsupported,
LengthExceedsMax,
LengthMismatch,
NonZeroPadding,
InvalidHex,
InvalidUTF8,
DepthLimitExceeded,
LengthLimitExceeded,
}Expand description
Errors that can occur when working with XDR types.
This error type can be compared via PartialEq.
Variants§
Invalid
The XDR value is invalid or malformed.
Unsupported
The XDR value or operation is not supported.
LengthExceedsMax
The length of the value exceeds the maximum allowed length.
This occurs when trying to create a constrained type (e.g., VecM<T, MAX>)
from data that exceeds the MAX length parameter.
LengthMismatch
The length of the value does not match the expected length.
NonZeroPadding
XDR padding contains non-zero bytes (XDR requires zero padding).
InvalidHex
alloc only.The hex string is invalid.
This error occurs when parsing hex-encoded byte strings.
InvalidUTF8
The byte sequence is not valid UTF-8.
This occurs when attempting to convert a StringM to a UTF-8 String.
DepthLimitExceeded
The depth limit was exceeded during processing.
LengthLimitExceeded
The length limit was exceeded during processing.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<FromUtf8Error> for Error
Available on crate feature alloc only.
impl From<FromUtf8Error> for Error
alloc only.