pub struct CmdDetails {
pub endpoint_id: u16,
pub cluster_id: u32,
pub cmd_id: u32,
pub fab_idx: u8,
pub wildcard: bool,
pub command_ref: Option<u16>,
pub cluster_status: Cell<u8>,
}Expand description
The CmdDetails type captures all necessary information to perform an Attribute Read operation
This type is built by the Data Model during the expansion of the commands in the Invoke IM action
Fields§
§endpoint_id: u16The concrete (expanded) endpoint ID
cluster_id: u32The concrete (expanded) cluster ID
cmd_id: u32The concrete (expanded) command ID
fab_idx: u8The fabric index associated with this request
wildcard: boolWhether the original command was a wildcard one
command_ref: Option<u16>The CommandRef from the originating CommandDataIB, if any.
Echoed back in the response so the requester can correlate batched invokes.
cluster_status: Cell<u8>Cluster-specific status to stamp into the response StatusIB.clusterStatus
when the handler returns Err. 0 means “no cluster status” (the
reserved kSuccess value in Matter cluster-status enums).
Cluster handlers set this via InvokeContext::set_cluster_status
before returning an error. Stored here as a Cell<u8> rather than
on Error so that Result<T, Error> keeps its compact 1-byte error
payload across the codebase.
Implementations§
Source§impl CmdDetails
impl CmdDetails
Sourcepub const fn new(
endpoint_id: u16,
cluster_id: u32,
cmd_id: u32,
fab_idx: u8,
wildcard: bool,
command_ref: Option<u16>,
) -> CmdDetails
pub const fn new( endpoint_id: u16, cluster_id: u32, cmd_id: u32, fab_idx: u8, wildcard: bool, command_ref: Option<u16>, ) -> CmdDetails
Construct a new CmdDetails. Initializes cluster_status to 0
(no cluster-specific status to report).
Sourcepub fn set_cluster_status(&self, cluster_status: u8)
pub fn set_cluster_status(&self, cluster_status: u8)
Stamp a cluster-specific status code onto this invoke. The value is
echoed in StatusIB.clusterStatus when the handler returns Err.
0 is treated as “none” (Matter reserves it for kSuccess).
Sourcepub fn cluster_status(&self) -> Option<u16>
pub fn cluster_status(&self) -> Option<u16>
The currently stashed cluster-specific status, if any.
Source§impl CmdDetails
impl CmdDetails
Sourcepub const fn reply_path(&self) -> CmdPath
pub const fn reply_path(&self) -> CmdPath
Return the path with which this command invocation request should be replied, for the case where the command generates a simple status message as opposed to a true command reply.
pub fn status(&self, status: IMStatusCode) -> Option<CmdStatus>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for CmdDetails
impl !RefUnwindSafe for CmdDetails
impl !Sync for CmdDetails
impl Send for CmdDetails
impl Unpin for CmdDetails
impl UnsafeUnpin for CmdDetails
impl UnwindSafe for CmdDetails
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more