#[non_exhaustive]pub enum ImError {
Codec(Error),
NotAStruct,
MissingField(&'static str),
UnexpectedValue(&'static str),
EmptyInvokeResponse,
InvalidStatusCode {
code: u64,
},
AccumulatorOverflow {
elements: usize,
bytes: usize,
max_elements: usize,
max_bytes: usize,
},
}Expand description
Errors produced while building or parsing Interaction Model messages.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Codec(Error)
Underlying TLV decode failure.
NotAStruct
The message’s outermost element was not the expected anonymous struct.
MissingField(&'static str)
A required field was absent from the message.
UnexpectedValue(&'static str)
A field held a TLV value of an unexpected type.
EmptyInvokeResponse
An InvokeResponseIB contained neither a Command nor a Status member.
InvalidStatusCode
A StatusIB.Status field was present on the wire but carried a value
outside the valid Matter status-code range (0x00..=0xFF, a single
octet per Matter Core Spec §8.10). The raw decoded value is preserved
so callers can log the malformed code. This is deliberately distinct
from MissingField: the field was present, it
was simply out of range, and conflating the two would mislead a caller
diagnosing a non-conformant device.
AccumulatorOverflow
A ReportAccumulator exceeded its in-crate
total-size ceiling while merging chunked ReportData. This is
defense-in-depth against a peer streaming an unbounded chunked
read/report set: the accumulator caps both the number of distinct
accumulated elements and an estimate of their total in-memory byte
size, returning this error rather than growing without bound.
Trait Implementations§
Source§impl Error for ImError
impl Error for ImError
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()