pub trait ClusterAsyncHandler {
const CLUSTER: Cluster<'static>;
// Required methods
fn dataver(&self) -> u32;
fn dataver_changed(&self);
async fn max_continuous_current(
&self,
ctx: impl ReadContext,
) -> Result<Maybe<i64, AsNullable>, Error>;
async fn max_voltage(
&self,
ctx: impl ReadContext,
) -> Result<Maybe<i64, AsNullable>, Error>;
async fn number_of_poles(
&self,
ctx: impl ReadContext,
) -> Result<Maybe<u16, AsNullable>, Error>;
async fn end_of_life(
&self,
ctx: impl ReadContext,
) -> Result<Maybe<EndOfLifeEnum, AsNullable>, Error>;
async fn service_entrance_rated(
&self,
ctx: impl ReadContext,
) -> Result<Maybe<bool, AsNullable>, 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)
async fn max_continuous_current( &self, ctx: impl ReadContext, ) -> Result<Maybe<i64, AsNullable>, Error>
async fn max_voltage( &self, ctx: impl ReadContext, ) -> Result<Maybe<i64, AsNullable>, Error>
async fn number_of_poles( &self, ctx: impl ReadContext, ) -> Result<Maybe<u16, AsNullable>, Error>
async fn end_of_life( &self, ctx: impl ReadContext, ) -> Result<Maybe<EndOfLifeEnum, AsNullable>, Error>
async fn service_entrance_rated( &self, ctx: impl ReadContext, ) -> Result<Maybe<bool, AsNullable>, 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".