Skip to main content

Error

Enum Error 

Source
#[non_exhaustive]
pub enum Error {
Show 21 variants Store(StoreError), Codec(Error), Cert(Error), Noc(NocError), Signer(String), Snapshot(String), Driver(DriverError), Transport(Error), NotCommissioned(String), ControllerStopped, InteractionModel(ImError), Operational(String), Trust(String), SetupCode(String), NoTrust, CommissioningWindowRejected(u8), WouldRemoveSelf, OperationalCredentialsRejected(u8), AclWouldLockOut, GroupCommandRejected(u8), GroupNotProvisioned(u16),
}
Expand description

Errors surfaced by the controller’s persistence and identity layer.

#[non_exhaustive] so later sub-phases can add networked variants (e.g. SessionLost, DeviceUnreachable) without a breaking change.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Store(StoreError)

The backing ControllerStore failed.

§

Codec(Error)

TLV encode/decode of the snapshot blob failed.

§

Cert(Error)

A certificate failed to parse or serialize.

§

Noc(NocError)

NOC/RCAC issuance failed.

§

Signer(String)

A signing key could not be generated or reconstructed.

§

Snapshot(String)

The persisted snapshot was structurally invalid or an unknown version.

§

Driver(DriverError)

CASE session establishment failed, or a driver operation errored.

§

Transport(Error)

A transport / session-manager (framing, MRP) operation failed.

§

NotCommissioned(String)

No fabric exists, or the requested node/fabric is not addressable.

§

ControllerStopped

The owning controller task has stopped (channel closed).

§

InteractionModel(ImError)

An Interaction-Model request/response failed to build or parse.

§

Operational(String)

An operational-path failure with a human-readable detail — a key derivation (operational IPK / compressed fabric id), a transport/session send or decode, a request timeout, or a subscription liveness timeout.

§

Trust(String)

Attestation trust material could not be loaded.

§

SetupCode(String)

The setup code (QR / manual) could not be parsed.

§

NoTrust

No attestation trust configured; commissioning cannot verify the device.

§

CommissioningWindowRejected(u8)

An AdministratorCommissioning command returned a non-success IM status (e.g. 0x02 Busy, 0x03 PAKEParameterError, 0x04 WindowNotOpen reported as a cluster status). The raw IM status byte is preserved.

§

WouldRemoveSelf

Refused to remove the controller’s own fabric (would sever the CASE session and orphan persisted device state). No force override exists.

§

OperationalCredentialsRejected(u8)

An OperationalCredentials command returned a non-success NodeOperationalCertStatusEnum (e.g. 7 InvalidFabricIndex). Raw code preserved.

§

AclWouldLockOut

Refused an ACL write that would strip our own administrative access (no Administer/CASE entry covering our commissioner node id). Prevents orphaning the device. Checked before any bytes are sent.

§

GroupCommandRejected(u8)

A Groups / GroupKeyManagement command returned a non-success status (e.g. ResourceExhausted from MaxGroupsPerFabric). Raw status preserved.

§

GroupNotProvisioned(u16)

A group send (invoke_group) named a key_set_id that has not been provisioned on the controller’s fabric (no matching GroupKeySetConfig in group_keys). Call MatterController::create_group first to mint and persist the key set.

Implementations§

Source§

impl Error

Source

pub fn network_feature_unsupported(&self) -> Option<NetworkKind>

If this error is the device rejecting the supplied network-credential type — e.g. Thread credentials handed to a Wi-Fi-only device (NetworkCommissioning::FeatureMap lacks the needed bit) — returns which network type the credentials required. Use this to route to a different credential type instead of substring-matching the rendered message.

Returns None for every other error.

Trait Implementations§

Source§

impl Debug for Error

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Error

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for Error

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<DriverError> for Error

Source§

fn from(source: DriverError) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<ImError> for Error

Source§

fn from(source: ImError) -> Self

Converts to this type from the input type.
Source§

impl From<NocError> for Error

Source§

fn from(source: NocError) -> Self

Converts to this type from the input type.
Source§

impl From<StoreError> for Error

Source§

fn from(source: StoreError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl !RefUnwindSafe for Error

§

impl !UnwindSafe for Error

§

impl Freeze for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl UnsafeUnpin for Error

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more