pub trait ClusterHandler {
const CLUSTER: Cluster<'static>;
// Required methods
fn dataver(&self) -> u32;
fn dataver_changed(&self);
fn name_support(
&self,
ctx: impl ReadContext,
) -> Result<NameSupportBitmap, Error>;
fn handle_add_group<P>(
&self,
ctx: impl InvokeContext,
request: AddGroupRequest<'_>,
response: AddGroupResponseBuilder<P>,
) -> Result<P, Error>
where P: TLVBuilderParent;
fn handle_view_group<P>(
&self,
ctx: impl InvokeContext,
request: ViewGroupRequest<'_>,
response: ViewGroupResponseBuilder<P>,
) -> Result<P, Error>
where P: TLVBuilderParent;
fn handle_get_group_membership<P>(
&self,
ctx: impl InvokeContext,
request: GetGroupMembershipRequest<'_>,
response: GetGroupMembershipResponseBuilder<P>,
) -> Result<P, Error>
where P: TLVBuilderParent;
fn handle_remove_group<P>(
&self,
ctx: impl InvokeContext,
request: RemoveGroupRequest<'_>,
response: RemoveGroupResponseBuilder<P>,
) -> Result<P, Error>
where P: TLVBuilderParent;
fn handle_remove_all_groups(
&self,
ctx: impl InvokeContext,
) -> Result<(), Error>;
fn handle_add_group_if_identifying(
&self,
ctx: impl InvokeContext,
request: AddGroupIfIdentifyingRequest<'_>,
) -> Result<(), Error>;
// Provided methods
fn lifecycle(
&self,
_ctx: impl HandlerContext,
_op: LifecycleOp,
) -> Result<(), Error> { ... }
fn run(
&self,
_ctx: impl HandlerContext,
) -> impl Future<Output = Result<(), Error>> { ... }
}Expand description
The handler trait for the cluster.
Required Associated Constants§
Required Methods§
fn dataver(&self) -> u32
fn dataver_changed(&self)
fn name_support( &self, ctx: impl ReadContext, ) -> Result<NameSupportBitmap, Error>
fn handle_add_group<P>(
&self,
ctx: impl InvokeContext,
request: AddGroupRequest<'_>,
response: AddGroupResponseBuilder<P>,
) -> Result<P, Error>where
P: TLVBuilderParent,
fn handle_view_group<P>(
&self,
ctx: impl InvokeContext,
request: ViewGroupRequest<'_>,
response: ViewGroupResponseBuilder<P>,
) -> Result<P, Error>where
P: TLVBuilderParent,
fn handle_get_group_membership<P>(
&self,
ctx: impl InvokeContext,
request: GetGroupMembershipRequest<'_>,
response: GetGroupMembershipResponseBuilder<P>,
) -> Result<P, Error>where
P: TLVBuilderParent,
fn handle_remove_group<P>(
&self,
ctx: impl InvokeContext,
request: RemoveGroupRequest<'_>,
response: RemoveGroupResponseBuilder<P>,
) -> Result<P, Error>where
P: TLVBuilderParent,
fn handle_remove_all_groups(&self, ctx: impl InvokeContext) -> Result<(), Error>
fn handle_add_group_if_identifying( &self, ctx: impl InvokeContext, request: AddGroupIfIdentifyingRequest<'_>, ) -> Result<(), Error>
Provided Methods§
fn lifecycle( &self, _ctx: impl HandlerContext, _op: LifecycleOp, ) -> Result<(), Error>
fn run( &self, _ctx: impl HandlerContext, ) -> impl Future<Output = Result<(), Error>>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".