pub trait SceneClusters {
// Required methods
fn capture<P>(&self, endpoint_id: u16, parent: P) -> Result<P, Error>
where P: TLVBuilderParent;
fn check_scenable(&self, cluster_id: u32, attribute_id: u32) -> Option<bool>;
fn apply<C>(
&self,
ctx: &C,
endpoint_id: u16,
cluster_id: u32,
avp_list: &TLVContainer<'_, AttributeValuePairStruct<'_>, ArrayContainer>,
transition_time_ms: u32,
) -> impl Future<Output = Result<bool, Error>>
where C: HandlerContext;
}Expand description
Tuple-recursive composition of SceneClusterHandlers. Mirrors
crate::dm::ChainedHandler: terminated by (), one cluster
registers as (impl, ()), multiple as (a, (b, (c, ()))).
Required Methods§
Sourcefn capture<P>(&self, endpoint_id: u16, parent: P) -> Result<P, Error>where
P: TLVBuilderParent,
fn capture<P>(&self, endpoint_id: u16, parent: P) -> Result<P, Error>where
P: TLVBuilderParent,
Emit one EFS struct per registered cluster whose
endpoint_id() matches endpoint_id. EFS structs are written
directly into the parent without an outer array wrapper; the
caller is responsible for the trailing array terminator.
Sourcefn check_scenable(&self, cluster_id: u32, attribute_id: u32) -> Option<bool>
fn check_scenable(&self, cluster_id: u32, attribute_id: u32) -> Option<bool>
Some(true) if cluster_id is registered and attribute_id
is scenable on it; Some(false) if registered but
non-scenable (AddScene returns INVALID_COMMAND); None
if cluster_id is not registered (lenient — store the bytes,
silently skip on recall; matches chip’s firmware-downgrade
behaviour).
Sourcefn apply<C>(
&self,
ctx: &C,
endpoint_id: u16,
cluster_id: u32,
avp_list: &TLVContainer<'_, AttributeValuePairStruct<'_>, ArrayContainer>,
transition_time_ms: u32,
) -> impl Future<Output = Result<bool, Error>>where
C: HandlerContext,
fn apply<C>(
&self,
ctx: &C,
endpoint_id: u16,
cluster_id: u32,
avp_list: &TLVContainer<'_, AttributeValuePairStruct<'_>, ArrayContainer>,
transition_time_ms: u32,
) -> impl Future<Output = Result<bool, Error>>where
C: HandlerContext,
Find the registered cluster matching (cluster_id, endpoint_id)
and let it apply avp_list. Returns Ok(true) if handled,
Ok(false) if no registered cluster matches.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".