pub trait ClusterAsyncHandler {
const CLUSTER: Cluster<'static>;
Show 15 methods
// Required methods
fn dataver(&self) -> u32;
fn dataver_changed(&self);
async fn handle_suppress_alarm(
&self,
ctx: impl InvokeContext,
request: SuppressAlarmRequest<'_>,
) -> Result<(), Error>;
async fn handle_enable_disable_alarm(
&self,
ctx: impl InvokeContext,
request: EnableDisableAlarmRequest<'_>,
) -> 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 current_sensitivity_level(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<u8, Error>> { ... }
fn supported_sensitivity_levels(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<u8, Error>> { ... }
fn default_sensitivity_level(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<u8, Error>> { ... }
fn alarms_active(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<AlarmModeBitmap, Error>> { ... }
fn alarms_suppressed(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<AlarmModeBitmap, Error>> { ... }
fn alarms_enabled(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<AlarmModeBitmap, Error>> { ... }
fn alarms_supported(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<AlarmModeBitmap, Error>> { ... }
fn sensor_fault(
&self,
ctx: impl ReadContext,
) -> impl Future<Output = Result<SensorFaultBitmap, Error>> { ... }
fn set_current_sensitivity_level(
&self,
ctx: impl WriteContext,
value: u8,
) -> 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)
async fn handle_suppress_alarm( &self, ctx: impl InvokeContext, request: SuppressAlarmRequest<'_>, ) -> Result<(), Error>
async fn handle_enable_disable_alarm( &self, ctx: impl InvokeContext, request: EnableDisableAlarmRequest<'_>, ) -> 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 current_sensitivity_level( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<u8, Error>>
fn supported_sensitivity_levels( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<u8, Error>>
fn default_sensitivity_level( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<u8, Error>>
fn alarms_active( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<AlarmModeBitmap, Error>>
fn alarms_suppressed( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<AlarmModeBitmap, Error>>
fn alarms_enabled( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<AlarmModeBitmap, Error>>
fn alarms_supported( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<AlarmModeBitmap, Error>>
fn sensor_fault( &self, ctx: impl ReadContext, ) -> impl Future<Output = Result<SensorFaultBitmap, Error>>
fn set_current_sensitivity_level( &self, ctx: impl WriteContext, value: u8, ) -> impl Future<Output = Result<(), Error>>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".