pub trait ClusterAsyncHandler {
const CLUSTER: Cluster<'static>;
Show 13 methods
// Required methods
fn dataver(&self) -> u32;
fn dataver_changed(&self);
async fn main_state(
&self,
ctx: impl ReadContext,
) -> Result<MainStateEnum, Error>;
async fn current_error_list<P>(
&self,
ctx: impl ReadContext,
builder: ArrayAttributeRead<ToTLVArrayBuilder<P, ClosureErrorEnum>, ToTLVBuilder<P, ClosureErrorEnum>>,
) -> Result<P, Error>
where P: TLVBuilderParent;
async fn overall_current_state<P>(
&self,
ctx: impl ReadContext,
builder: NullableBuilder<P, OverallCurrentStateStructBuilder<P>>,
) -> Result<P, Error>
where P: TLVBuilderParent;
async fn overall_target_state<P>(
&self,
ctx: impl ReadContext,
builder: NullableBuilder<P, OverallTargetStateStructBuilder<P>>,
) -> Result<P, Error>
where P: TLVBuilderParent;
async fn handle_stop(&self, ctx: impl InvokeContext) -> Result<(), Error>;
async fn handle_move_to(
&self,
ctx: impl InvokeContext,
request: MoveToRequest<'_>,
) -> Result<(), Error>;
async fn handle_calibrate(
&self,
ctx: impl InvokeContext,
) -> 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 countdown_time(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<Maybe<u32, AsNullable>, Error>> { ... }
fn latch_control_modes(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<LatchControlModesBitmap, Error>> { ... }
}Expand description
The handler trait for the cluster.
Required Associated Constants§
Required Methods§
fn dataver(&self) -> u32
fn dataver_changed(&self)
async fn main_state( &self, ctx: impl ReadContext, ) -> Result<MainStateEnum, Error>
async fn current_error_list<P>(
&self,
ctx: impl ReadContext,
builder: ArrayAttributeRead<ToTLVArrayBuilder<P, ClosureErrorEnum>, ToTLVBuilder<P, ClosureErrorEnum>>,
) -> Result<P, Error>where
P: TLVBuilderParent,
async fn overall_current_state<P>(
&self,
ctx: impl ReadContext,
builder: NullableBuilder<P, OverallCurrentStateStructBuilder<P>>,
) -> Result<P, Error>where
P: TLVBuilderParent,
async fn overall_target_state<P>(
&self,
ctx: impl ReadContext,
builder: NullableBuilder<P, OverallTargetStateStructBuilder<P>>,
) -> Result<P, Error>where
P: TLVBuilderParent,
async fn handle_stop(&self, ctx: impl InvokeContext) -> Result<(), Error>
async fn handle_move_to( &self, ctx: impl InvokeContext, request: MoveToRequest<'_>, ) -> Result<(), Error>
async fn handle_calibrate(&self, ctx: impl InvokeContext) -> 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 countdown_time( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<Maybe<u32, AsNullable>, Error>>
fn latch_control_modes( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<LatchControlModesBitmap, Error>>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".