pub trait ClusterAsyncHandler {
const CLUSTER: Cluster<'static>;
Show 19 methods
// Required methods
fn dataver(&self) -> u32;
fn dataver_changed(&self);
async fn action_list<P>(
&self,
ctx: impl ReadContext,
builder: ArrayAttributeRead<ActionStructArrayBuilder<P>, ActionStructBuilder<P>>,
) -> Result<P, Error>
where P: TLVBuilderParent;
async fn endpoint_lists<P>(
&self,
ctx: impl ReadContext,
builder: ArrayAttributeRead<EndpointListStructArrayBuilder<P>, EndpointListStructBuilder<P>>,
) -> Result<P, Error>
where P: TLVBuilderParent;
async fn handle_instant_action(
&self,
ctx: impl InvokeContext,
request: InstantActionRequest<'_>,
) -> Result<(), Error>;
async fn handle_instant_action_with_transition(
&self,
ctx: impl InvokeContext,
request: InstantActionWithTransitionRequest<'_>,
) -> Result<(), Error>;
async fn handle_start_action(
&self,
ctx: impl InvokeContext,
request: StartActionRequest<'_>,
) -> Result<(), Error>;
async fn handle_start_action_with_duration(
&self,
ctx: impl InvokeContext,
request: StartActionWithDurationRequest<'_>,
) -> Result<(), Error>;
async fn handle_stop_action(
&self,
ctx: impl InvokeContext,
request: StopActionRequest<'_>,
) -> Result<(), Error>;
async fn handle_pause_action(
&self,
ctx: impl InvokeContext,
request: PauseActionRequest<'_>,
) -> Result<(), Error>;
async fn handle_pause_action_with_duration(
&self,
ctx: impl InvokeContext,
request: PauseActionWithDurationRequest<'_>,
) -> Result<(), Error>;
async fn handle_resume_action(
&self,
ctx: impl InvokeContext,
request: ResumeActionRequest<'_>,
) -> Result<(), Error>;
async fn handle_enable_action(
&self,
ctx: impl InvokeContext,
request: EnableActionRequest<'_>,
) -> Result<(), Error>;
async fn handle_enable_action_with_duration(
&self,
ctx: impl InvokeContext,
request: EnableActionWithDurationRequest<'_>,
) -> Result<(), Error>;
async fn handle_disable_action(
&self,
ctx: impl InvokeContext,
request: DisableActionRequest<'_>,
) -> Result<(), Error>;
async fn handle_disable_action_with_duration(
&self,
ctx: impl InvokeContext,
request: DisableActionWithDurationRequest<'_>,
) -> 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>> { ... }
fn setup_url<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> impl Future<Output = Result<P, Error>>
where P: TLVBuilderParent { ... }
}Expand description
The handler trait for the cluster.
Required Associated Constants§
Required Methods§
fn dataver(&self) -> u32
fn dataver_changed(&self)
async fn action_list<P>(
&self,
ctx: impl ReadContext,
builder: ArrayAttributeRead<ActionStructArrayBuilder<P>, ActionStructBuilder<P>>,
) -> Result<P, Error>where
P: TLVBuilderParent,
async fn endpoint_lists<P>(
&self,
ctx: impl ReadContext,
builder: ArrayAttributeRead<EndpointListStructArrayBuilder<P>, EndpointListStructBuilder<P>>,
) -> Result<P, Error>where
P: TLVBuilderParent,
async fn handle_instant_action( &self, ctx: impl InvokeContext, request: InstantActionRequest<'_>, ) -> Result<(), Error>
async fn handle_instant_action_with_transition( &self, ctx: impl InvokeContext, request: InstantActionWithTransitionRequest<'_>, ) -> Result<(), Error>
async fn handle_start_action( &self, ctx: impl InvokeContext, request: StartActionRequest<'_>, ) -> Result<(), Error>
async fn handle_start_action_with_duration( &self, ctx: impl InvokeContext, request: StartActionWithDurationRequest<'_>, ) -> Result<(), Error>
async fn handle_stop_action( &self, ctx: impl InvokeContext, request: StopActionRequest<'_>, ) -> Result<(), Error>
async fn handle_pause_action( &self, ctx: impl InvokeContext, request: PauseActionRequest<'_>, ) -> Result<(), Error>
async fn handle_pause_action_with_duration( &self, ctx: impl InvokeContext, request: PauseActionWithDurationRequest<'_>, ) -> Result<(), Error>
async fn handle_resume_action( &self, ctx: impl InvokeContext, request: ResumeActionRequest<'_>, ) -> Result<(), Error>
async fn handle_enable_action( &self, ctx: impl InvokeContext, request: EnableActionRequest<'_>, ) -> Result<(), Error>
async fn handle_enable_action_with_duration( &self, ctx: impl InvokeContext, request: EnableActionWithDurationRequest<'_>, ) -> Result<(), Error>
async fn handle_disable_action( &self, ctx: impl InvokeContext, request: DisableActionRequest<'_>, ) -> Result<(), Error>
async fn handle_disable_action_with_duration( &self, ctx: impl InvokeContext, request: DisableActionWithDurationRequest<'_>, ) -> 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>>
fn setup_url<P>(
&self,
ctx: impl ReadContext,
builder: Utf8StrBuilder<P>,
) -> impl Future<Output = Result<P, Error>>where
P: TLVBuilderParent,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".