pub enum ValidationError {
Show 15 variants
UnknownMatterCode(String),
MalformedCode {
part: MatterPart,
found: String,
},
MissingSoft {
code: String,
},
IncorrectSoftLength {
code: String,
expected: usize,
found: usize,
},
InvalidSoftFormat {
code: String,
},
MissingRaw {
code: String,
},
UnexpectedRaw {
code: String,
},
IncorrectRawSize {
code: String,
expected: usize,
found: usize,
},
IncompatiblePromotion(String),
InvalidPromotionTarget {
code: String,
lead: usize,
},
InvalidPromotionResult {
from: String,
to: String,
},
InvalidSizingOperation(String),
NonCanonicalEncoding(MatterPart),
StructuralIntegrityError,
SizeOverflow,
}core only.Expand description
Errors produced while validating Matter builder inputs.
Variants§
UnknownMatterCode(String)
The code string does not correspond to a known Matter code.
MalformedCode
A structural component of the code was malformed.
Fields
part: MatterPartWhich structural part was malformed.
MissingSoft
The code requires a soft field but none was provided.
IncorrectSoftLength
The soft field has the wrong length for the given code.
Fields
InvalidSoftFormat
The soft field contains non-Base64 characters.
MissingRaw
The code requires raw data but none was provided.
UnexpectedRaw
Raw data was provided for a code that has no raw payload.
IncorrectRawSize
The raw data length does not match the code’s expected size.
Fields
IncompatiblePromotion(String)
A fixed-size code was used where a variable-size promotion is required.
InvalidPromotionTarget
The requested promotion for the given code and lead size is not a valid CESR transformation.
InvalidPromotionResult
The result of a code promotion was invalid or unknown.
InvalidSizingOperation(String)
Cannot determine a fixed raw size for a variable-size code.
NonCanonicalEncoding(MatterPart)
Non-canonical encoding: padding bits in the given part were non-zero.
StructuralIntegrityError
The parsed components do not add up to the expected total length.
SizeOverflow
Computing the primitive’s full size from the decoded soft field overflowed
usize. The soft field is attacker-controlled; a declared size this large
cannot describe a real frame, so it is rejected rather than wrapped.
Trait Implementations§
Source§impl Debug for ValidationError
impl Debug for ValidationError
Source§impl Display for ValidationError
impl Display for ValidationError
impl Eq for ValidationError
Source§impl Error for ValidationError
impl Error for ValidationError
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()