pub trait ClusterAsyncHandler {
const CLUSTER: Cluster<'static>;
Show 14 methods
// Required methods
fn dataver(&self) -> u32;
fn dataver_changed(&self);
async fn phase_list<P>(
&self,
ctx: impl ReadContext,
builder: ArrayAttributeRead<NullableBuilder<P, Utf8StrArrayBuilder<P>>, Utf8StrBuilder<P>>,
) -> Result<P, Error>
where P: TLVBuilderParent;
async fn current_phase(
&self,
ctx: impl ReadContext,
) -> Result<Maybe<u8, AsNullable>, Error>;
async fn operational_state_list<P>(
&self,
ctx: impl ReadContext,
builder: ArrayAttributeRead<OperationalStateStructArrayBuilder<P>, OperationalStateStructBuilder<P>>,
) -> Result<P, Error>
where P: TLVBuilderParent;
async fn operational_state(
&self,
ctx: impl ReadContext,
) -> Result<OperationalStateEnum, Error>;
async fn operational_error<P>(
&self,
ctx: impl ReadContext,
builder: ErrorStateStructBuilder<P>,
) -> Result<P, Error>
where P: TLVBuilderParent;
async fn handle_pause<P>(
&self,
ctx: impl InvokeContext,
response: OperationalCommandResponseBuilder<P>,
) -> Result<P, Error>
where P: TLVBuilderParent;
async fn handle_stop<P>(
&self,
ctx: impl InvokeContext,
response: OperationalCommandResponseBuilder<P>,
) -> Result<P, Error>
where P: TLVBuilderParent;
async fn handle_start<P>(
&self,
ctx: impl InvokeContext,
response: OperationalCommandResponseBuilder<P>,
) -> Result<P, Error>
where P: TLVBuilderParent;
async fn handle_resume<P>(
&self,
ctx: impl InvokeContext,
response: OperationalCommandResponseBuilder<P>,
) -> Result<P, Error>
where P: TLVBuilderParent;
// 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>> { ... }
}Expand description
The handler trait for the cluster.
Required Associated Constants§
Required Methods§
fn dataver(&self) -> u32
fn dataver_changed(&self)
async fn phase_list<P>(
&self,
ctx: impl ReadContext,
builder: ArrayAttributeRead<NullableBuilder<P, Utf8StrArrayBuilder<P>>, Utf8StrBuilder<P>>,
) -> Result<P, Error>where
P: TLVBuilderParent,
async fn current_phase( &self, ctx: impl ReadContext, ) -> Result<Maybe<u8, AsNullable>, Error>
async fn operational_state_list<P>(
&self,
ctx: impl ReadContext,
builder: ArrayAttributeRead<OperationalStateStructArrayBuilder<P>, OperationalStateStructBuilder<P>>,
) -> Result<P, Error>where
P: TLVBuilderParent,
async fn operational_state( &self, ctx: impl ReadContext, ) -> Result<OperationalStateEnum, Error>
async fn operational_error<P>(
&self,
ctx: impl ReadContext,
builder: ErrorStateStructBuilder<P>,
) -> Result<P, Error>where
P: TLVBuilderParent,
async fn handle_pause<P>(
&self,
ctx: impl InvokeContext,
response: OperationalCommandResponseBuilder<P>,
) -> Result<P, Error>where
P: TLVBuilderParent,
async fn handle_stop<P>(
&self,
ctx: impl InvokeContext,
response: OperationalCommandResponseBuilder<P>,
) -> Result<P, Error>where
P: TLVBuilderParent,
async fn handle_start<P>(
&self,
ctx: impl InvokeContext,
response: OperationalCommandResponseBuilder<P>,
) -> Result<P, Error>where
P: TLVBuilderParent,
async fn handle_resume<P>(
&self,
ctx: impl InvokeContext,
response: OperationalCommandResponseBuilder<P>,
) -> Result<P, Error>where
P: TLVBuilderParent,
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>>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".