#[non_exhaustive]pub enum Status {
Show 36 variants
Success,
Failure,
InvalidSubscription,
UnsupportedAccess,
UnsupportedEndpoint,
InvalidAction,
UnsupportedCommand,
InvalidCommand,
UnsupportedAttribute,
ConstraintError,
UnsupportedWrite,
ResourceExhausted,
NotFound,
UnreportableAttribute,
InvalidDataType,
UnsupportedRead,
DataVersionMismatch,
Timeout,
UnsupportedNode,
Busy,
AccessRestricted,
UnsupportedCluster,
NoUpstreamSubscription,
NeedsTimedInteraction,
UnsupportedEvent,
PathsExhausted,
TimedRequestMismatch,
FailsafeRequired,
InvalidInState,
NoCommandResponse,
TermsAndConditionsChanged,
MaintenanceRequired,
DynamicConstraintError,
AlreadyExists,
InvalidTransportType,
Reserved(u8),
}Expand description
A status code (§8.10.1).
SUCCESS and FAILURE are the two general outcomes; everything else says which check
failed, and a client is expected to distinguish them — §8.10 exists so that “attribute
does not exist” and “you may not read it” are different answers.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Success
0x00 — “Operation was successful.”
Failure
0x01 — “Operation was not successful.”
InvalidSubscription
0x7D — “Subscription ID is not active.”
UnsupportedAccess
0x7E — the sender lacks the privilege this action needs. Distinct from
Status::UnsupportedAttribute on purpose: which one is returned tells a client
whether the thing exists.
UnsupportedEndpoint
0x7F — “The endpoint indicated is unsupported.”
InvalidAction
0x80 — “The action is malformed, has missing fields, or fields with invalid
values. Action not carried out.”
UnsupportedCommand
0x81 — “The indicated command ID is not supported on the cluster instance. Command
not carried out.”
InvalidCommand
0x85 — “The cluster command is malformed, has missing fields, or fields with
invalid values. Command not carried out.”
UnsupportedAttribute
0x86 — “The indicated attribute ID, field ID or list entry does not exist for an
attribute path.”
ConstraintError
0x87 — “Out of range error or set to a reserved value. Attribute keeps its old
value.”
UnsupportedWrite
0x88 — “Attempt to write a read-only attribute.”
ResourceExhausted
0x89 — “An action or operation failed due to insufficient available resources.”
NotFound
0x8B — “The indicated data field or entry could not be found.”
UnreportableAttribute
0x8C — “Reports cannot be issued for this attribute.”
InvalidDataType
0x8D — “The data type indicated is undefined or invalid.”
UnsupportedRead
0x8F — “Attempt to read a write-only attribute.”
DataVersionMismatch
0x92 — “Cluster instance data version did not match request path”. What a
DataVersionFilter produces when the client’s cached version is stale.
Timeout
0x94 — “The transaction was aborted due to time being exceeded.”
UnsupportedNode
0x9B — “The node ID indicated is not supported.”
Busy
0x9C — “The receiver is busy processing another action.”
AccessRestricted
0x9D — access is barred by an Access Restriction List (§6.6).
UnsupportedCluster
0xC3 — “The cluster indicated is not supported.”
NoUpstreamSubscription
0xC5 — “Used by proxies to convey to clients the lack of an upstream
subscription.”
NeedsTimedInteraction
0xC6 — “A Untimed Write or Untimed Invoke interaction was received for an
attribute or command requiring a Timed interaction.”
UnsupportedEvent
0xC7 — “The indicated event ID is not supported.”
PathsExhausted
0xC8 — “The receiver has insufficient resources to process all the paths in the
request.”
TimedRequestMismatch
0xC9 — a TimedRequest flag that disagrees with whether a Timed interaction is
actually in progress.
FailsafeRequired
0xCA — “A request requiring a Fail-safe context was invoked without one.”
InvalidInState
0xCB — “The received request cannot be handled due to the current operational
state of the device.”
NoCommandResponse
0xCC — “A CommandDataIB is missing a response.”
TermsAndConditionsChanged
0xCD — the node requires updated Terms and Conditions acceptance.
MaintenanceRequired
0xCE — the node requires user maintenance before it can serve this request.
DynamicConstraintError
0xCF — “The value for the data type was not accepted due to runtime validation
issues.”
Distinct from Status::ConstraintError on purpose: that one means the value was
outside the schema’s range, this one that it was inside the schema and wrong for
the device’s current state — a setpoint below the heating limit, say.
AlreadyExists
0xD0 — “Attempt to create an entity that already exists or create an entity with an
identifier that is already in use.”
InvalidTransportType
0xD1 — “Attempt to process on a transport type not valid for this element.”
§8.8.2.3 step b.iv: what a command with the Large Message quality (§7.7.5) answers when it arrives over UDP rather than TCP.
Reserved(u8)
A value §8.10.1 marks reserved, or one this revision does not know.
Kept rather than folded into Status::Failure: a proxy that had to substitute a
code it could represent would be inventing an answer, and a status invented in the
middle of a path is worse than one that is merely obsolete.
Implementations§
Source§impl Status
impl Status
Sourcepub const fn from_value(value: u8) -> Self
pub const fn from_value(value: u8) -> Self
The status a code names.
Sourcepub const fn is_success(self) -> bool
pub const fn is_success(self) -> bool
Whether this is Status::Success.