Skip to main content

Module error

Module error 

Source
Expand description

One error type for the whole crate.

Two things are true at once about a failure in a Matter stack: it has a local cause that a developer needs (a truncated TLV element, a nonce that did not fit) and it may have a wire meaning that a peer is owed (Core §8.10’s INVALID_ACTION, RESOURCE_EXHAUSTED, …). Splitting those into two types means every layer converts between them and one of the conversions is always wrong, so Error carries both: an ErrorCode always, and an interaction-model status when one applies.

Resource exhaustion is a value here, never an abort — a device that runs out of exchanges answers BUSY and stays on the network.

Structs§

Error
A failure, with its local cause and — when the specification gives it one — the status code a peer is owed.

Enums§

ErrorCode
What went wrong, locally.

Type Aliases§

Result
The crate’s result type.